{"record":{"id":"d280828e023d23c5","repo":"iflytek/astron-agent","slug":"question-answer-resume-data-error","errorCode":"QUESTION_ANSWER_RESUME_DATA_ERROR","errorMessage":"Resume data exception","messagePattern":"Resume data exception","errorType":"error_code","errorClass":"CustomException","httpStatus":null,"severity":"error","filePath":"core/workflow/engine/nodes/question_answer/question_answer_node.py","lineNumber":348,"sourceCode":"            )\n            if res:\n                msg_str = res.get(\"message\", \"\")\n                message: Dict[str, Any] = json.loads(msg_str)\n                metadata = res.get(\"metadata\", {})\n                resume_data = ResumeData(\n                    event_type=message.get(\"event_type\", \"\"),\n                    content=message.get(\"content\", \"\"),\n                    retries=int(metadata.get(\"retries\", \"0\")),\n                    timestamp=int(metadata.get(\"timestamp\", \"0\")),\n                )\n                await span_context.add_info_events_async(\n                    {\"resume_data\": json.dumps(res, ensure_ascii=False)}\n                )\n                return resume_data\n            else:\n                err_msg = \"Resume data exception\"\n                span_context.add_error_event(err_msg)\n                raise CustomException(\n                    err_code=CodeEnum.QUESTION_ANSWER_RESUME_DATA_ERROR,\n                    err_msg=err_msg,\n                    cause_error=err_msg,\n                )\n\n        except CustomException as err:\n            raise err\n\n        except Exception as e:\n            raise CustomException(\n                err_code=CodeEnum.QUESTION_ANSWER_RESUME_DATA_ERROR,\n                err_msg=str(e),\n                cause_error=str(e),\n            ) from e\n\n    async def send_interrupt_callback(\n        self, callbacks: ChatCallBacks, data: InterruptData\n    ) -> None:","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/workflow/engine/nodes/question_answer/question_answer_node.py#L330-L366","documentation":"After fetching resume data from the event queue, qa_fetch_resume_data() validates the result; when the fetched data is not a valid resume payload it raises QUESTION_ANSWER_RESUME_DATA_ERROR with 'Resume data exception'. The event existed but its queued payload is missing, malformed, or of the wrong shape.","triggerScenarios":"Resuming a QA node where EventRegistry().fetch_resume_data returns data that fails the node's validity check (e.g. None-like or structurally wrong resume_data), triggering the else branch.","commonSituations":"A consumer elsewhere drained the queue and wrote back bad resume data, version-skew between producer and consumer payload formats, or an interrupted resume leaving partial data.","solutions":["Inspect the logged resume_data to see what was actually fetched and fix the producer of that payload","Re-trigger the QA node to generate fresh, well-formed resume data","Check for version/format changes between the code writing resume data and the code reading it"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# validate resume payload shape before enqueueing\nassert isinstance(resume_data, dict) and \"content\" in resume_data","typeGuard":"def is_valid_resume(d): return isinstance(d, dict) and bool(d)\n# caller: if not is_valid_resume(fetched): treat as failure and retrigger","tryCatchPattern":"try:\n    data = await node.qa_fetch_resume_data()\nexcept CustomException as e:\n    if e.code == CodeEnum.QUESTION_ANSWER_RESUME_DATA_ERROR:\n        retrigger_qa_node()","preventionTips":["Keep producer/consumer resume payload formats in version lockstep","Validate payloads before writing them to the event queue","Monitor for consumers that drain queues without proper write-back"],"tags":["workflow","state","resume"],"backgroundTag":"unexpected-response-shape","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}