{"record":{"id":"e4ac1f1ce800bd7a","repo":"iflytek/astron-agent","slug":"event-registry-not-found-error","errorCode":"EVENT_REGISTRY_NOT_FOUND_ERROR","errorMessage":"{CodeEnum.EVENT_REGISTRY_NOT_FOUND_ERROR.msg}","messagePattern":"\\{CodeEnum\\.EVENT_REGISTRY_NOT_FOUND_ERROR\\.msg\\}","errorType":"error_code","errorClass":"CustomException","httpStatus":null,"severity":"error","filePath":"core/workflow/engine/nodes/question_answer/question_answer_node.py","lineNumber":323,"sourceCode":"            )\n\n        await span_context.add_info_events_async(\n            {\"interrupt option\": json.dumps(interrupt_options, ensure_ascii=False)}\n        )\n        return interrupt_options\n\n    async def qa_fetch_resume_data(self, span_context: Span) -> ResumeData:\n        \"\"\"\n        Asynchronously fetch resume data\n\n        :param span_context: Context object for tracking and recording events\n        :return: ResumeData object containing event type, content, retries, and timestamp\n        :raises CustomException: When specific errors occur\n        \"\"\"\n        try:\n            event = EventRegistry().get_event(event_id=self.event_id)\n            if event is None:\n                raise CustomException(\n                    err_code=CodeEnum.EVENT_REGISTRY_NOT_FOUND_ERROR,\n                    err_msg=CodeEnum.EVENT_REGISTRY_NOT_FOUND_ERROR.msg,\n                    cause_error=\"Event does not exist\",\n                )\n            res = await EventRegistry().fetch_resume_data(\n                queue_name=event.get_node_q_name(), timeout=event.timeout\n            )\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(","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/workflow/engine/nodes/question_answer/question_answer_node.py#L305-L341","documentation":"qa_fetch_resume_data() looks up the node's paused event in the EventRegistry by event_id; if the registry returns None it raises EVENT_REGISTRY_NOT_FOUND_ERROR. The workflow cannot resume the question-answer node because the event it paused on is no longer registered (e.g. lost due to restart or expiry).","triggerScenarios":"Resuming a paused QA node (via handle_prompt_template_response or async_execute) with an event_id that has no registered event — the registry entry was evicted, expired, or never created because the process restarted.","commonSituations":"Service restart/crash losing in-memory or unexpired registry state, user replying after the event timed out and was cleaned up, or a corrupted event_id passed in the resume callback.","solutions":["Re-run or re-trigger the question-answer node so a fresh event is registered, then resume with the new event_id","Check EventRegistry persistence/TTL configuration if events should survive restarts","Verify the event_id used in the resume call matches the one emitted during the interrupt"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# check the event still exists before attempting resume\nevent = EventRegistry().get_event(event_id=evt_id)\nif event is None: retrigger_qa_node()","typeGuard":null,"tryCatchPattern":"try:\n    data = await node.qa_fetch_resume_data()\nexcept CustomException as e:\n    if e.code == CodeEnum.EVENT_REGISTRY_NOT_FOUND_ERROR:\n        retrigger_qa_node()  # event expired/lost; start a fresh interaction","preventionTips":["Persist event registry state or set TTLs longer than expected user response times","Always resume with the exact event_id emitted at interrupt time","Alert users before event timeouts expire"],"tags":["workflow","state","not-found"],"backgroundTag":"record-not-found","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"}