iflytek/astron-agent · error · CustomException

QUESTION_ANSWER_RESUME_DATA_ERROR

QUESTION_ANSWER_RESUME_DATA_ERROR

Error message

Resume data exception

What it means

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.

Solutions

  1. Inspect the logged resume_data to see what was actually fetched and fix the producer of that payload
  2. Re-trigger the QA node to generate fresh, well-formed resume data
  3. Check for version/format changes between the code writing resume data and the code reading it
Defensive patterns

Strategy: try-catch

Validate before calling

# validate resume payload shape before enqueueing
assert isinstance(resume_data, dict) and "content" in resume_data

Type guard

def is_valid_resume(d): return isinstance(d, dict) and bool(d)
# caller: if not is_valid_resume(fetched): treat as failure and retrigger

Try / catch

try:
    data = await node.qa_fetch_resume_data()
except CustomException as e:
    if e.code == CodeEnum.QUESTION_ANSWER_RESUME_DATA_ERROR:
        retrigger_qa_node()

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/d280828e023d23c5. Report an issue: GitHub.

Appendix: source

Thrown at core/workflow/engine/nodes/question_answer/question_answer_node.py:348

            )
            if res:
                msg_str = res.get("message", "")
                message: Dict[str, Any] = json.loads(msg_str)
                metadata = res.get("metadata", {})
                resume_data = ResumeData(
                    event_type=message.get("event_type", ""),
                    content=message.get("content", ""),
                    retries=int(metadata.get("retries", "0")),
                    timestamp=int(metadata.get("timestamp", "0")),
                )
                await span_context.add_info_events_async(
                    {"resume_data": json.dumps(res, ensure_ascii=False)}
                )
                return resume_data
            else:
                err_msg = "Resume data exception"
                span_context.add_error_event(err_msg)
                raise CustomException(
                    err_code=CodeEnum.QUESTION_ANSWER_RESUME_DATA_ERROR,
                    err_msg=err_msg,
                    cause_error=err_msg,
                )

        except CustomException as err:
            raise err

        except Exception as e:
            raise CustomException(
                err_code=CodeEnum.QUESTION_ANSWER_RESUME_DATA_ERROR,
                err_msg=str(e),
                cause_error=str(e),
            ) from e

    async def send_interrupt_callback(
        self, callbacks: ChatCallBacks, data: InterruptData
    ) -> None:

View on GitHub (pinned to 5e758547a8)