{"record":{"id":"5d7aee60003ed1aa","repo":"iflytek/astron-agent","slug":"node-run-error","errorCode":"NODE_RUN_ERROR","errorMessage":"{run_result.error}","messagePattern":"\\{run_result\\.error\\}","errorType":"error_code","errorClass":"CustomException","httpStatus":null,"severity":"error","filePath":"core/workflow/engine/dsl_engine.py","lineNumber":1256,"sourceCode":"        max_retries = retry_config.max_retries\n        node_type = node.node_id.split(\"::\")[0]\n\n        for attempt in range(max_retries + 1):\n            try:\n                # Select execution method based on node type\n                if node_type in CONTINUE_ON_ERROR_NOT_STREAM_NODE_TYPE:\n                    run_result = await self._execute_non_stream_node(\n                        node, span_context, retry_config\n                    )\n                else:\n                    run_result = await self._execute_stream_node(node, span_context)\n\n                # Check execution result\n                if run_result.status == WorkflowNodeExecutionStatus.SUCCEEDED:\n                    return run_result, False\n\n                # If not successful status, raise exception to enter retry logic\n                raise CustomException(\n                    CodeEnum.NODE_RUN_ERROR,\n                    err_msg=f\"{run_result.error}\",\n                    cause_error=f\"{run_result.error}\",\n                )\n\n            except Exception as error:\n                # Use chain of responsibility to handle errors\n                result, should_retry = await self.error_handler_chain.handle_error(\n                    error, node, self.engine_ctx, attempt, span_context\n                )\n\n                if result is not None:\n                    # Error handler returned a result\n                    fail_branch = (\n                        retry_config.error_strategy == ErrorHandler.FailBranch.value\n                    )\n                    return result, fail_branch\n","sourceCodeStart":1238,"sourceCodeEnd":1274,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/workflow/engine/dsl_engine.py#L1238-L1274","documentation":"When a node execution finishes with a non-SUCCEEDED status, _execute_with_error_handling raises NODE_RUN_ERROR whose message is the node's own run_result.error, feeding it into the engine's retry logic. This is the generic 'node failed' wrapper — the real cause is inside the message.","triggerScenarios":"Any node strategy returns a run_result with status FAILED/other non-success (API call failed inside the node, tool error, LLM refusal, missing input variable); the exception path is used so retry/fail-branch logic kicks in.","commonSituations":"LLM node hitting rate limits or invalid API keys; tool/plugin node returning errors; upstream variable missing so the node marks itself failed; timeouts reported as failures by the node itself.","solutions":["Read err_msg — it contains the node's own error describing the root cause","Enable the node's retry config or fail branch to tolerate transient failures","Fix the underlying node input (missing variables, invalid model credentials)","Check node/plugin logs for the failing execute call"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result, retry = await engine._execute_with_error_handling(node)\nexcept CustomException as e:\n    if e.err_code == CodeEnum.NODE_RUN_ERROR:\n        logger.warning(\"node %s failed: %s\", node.node_id, e.err_msg)  # err_msg holds root cause\n        route_to_fail_branch(node.node_id, e)","preventionTips":["Configure retry + fail branch on nodes calling external services","Validate node input variables before execution","Monitor err_msg contents to fix the underlying node error, not the wrapper"],"tags":["workflow","node-execution","retry"],"backgroundTag":"node-execution-failed","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}