iflytek/astron-agent · error · CustomException
RPA_REQUEST_ERROR
RPA_REQUEST_ERROR
Error message
{frame.message} What it means
The RPA node consumes a streaming HTTP/SSE response from the RPA service. Each `data:` frame is validated into `_StreamResponse`; if the frame's business `code` is non-zero, the node raises RPA_REQUEST_ERROR carrying the frame's `message` verbatim — this is the RPA service reporting a business-level failure for the request.
Solutions
- Read frame.message (the error text) to get the RPA service's own failure reason and fix the task parameters accordingly.
- Verify RPA service availability and credentials (endpoint URL, API key/robot configuration) in the node settings.
- Check RPA platform quotas/licensing if the message indicates limit exhaustion.
- Add retry with backoff for transient upstream errors (5xx-like codes) in the node or at the RPA service.
Example fix
// before: fire-and-forget stream read
for msg in resp:
frame = _StreamResponse.model_validate_json(msg.removeprefix("data:"))
// after: bounded retries for transient codes
for attempt in range(3):
try:
return await run_rpa_stream(payload)
except CustomException as e:
if is_transient(e) and attempt < 2:
await asyncio.sleep(2 ** attempt)
continue
raise Defensive patterns
Strategy: try-catch
Validate before calling
def rpa_node_config_ok(cfg: dict) -> bool:
return bool(cfg.get("endpoint")) and bool(cfg.get("api_key")) and bool(cfg.get("robot_id")) Type guard
def is_error_frame(frame: _StreamResponse) -> bool:
return frame.code != 0 Try / catch
try:
result = await run_rpa_node(...)
except CustomException as e:
if e.err_code == CodeEnum.RPA_REQUEST_ERROR:
logger.error(f"RPA service rejected task: {e.err_msg}")
if is_transient_rpa_failure(str(e.err_msg)):
result = await retry_with_backoff(run_rpa_node, attempts=3)
else:
raise
else:
raise Prevention
- Validate RPA endpoint, credentials, and robot configuration before deployment.
- Retry only transient upstream failures with exponential backoff.
- Monitor RPA service health and quotas.
- Surface frame.message to the operator — it names the exact upstream failure.
When it happens
Trigger: async_execute -> execute reads an SSE frame where `frame.code != 0` after `_StreamResponse.model_validate_json(msg.removeprefix("data:"))` — i.e. the remote RPA backend returned an error frame for the submitted task.
Common situations: RPA service downtime or internal error; invalid RPA task parameters (wrong robot ID, missing workflow key); RPA license/quota exhausted; auth token for the RPA platform expired; upstream robot execution failure at runtime.
Related errors
- Failed to establish SSE connection
- 40024
- AUDIT_OUTPUT_ERROR
- Chat ID cannot be empty
- CodeConvert.sparkLinkCode(code)
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/6702e1e91226dddd.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/nodes/rpa/rpa_node.py:99
}
)
async with aiohttp.ClientSession(
timeout=ClientTimeout(total=24 * 60 * 60, sock_connect=30)
) as session:
async with session.post(
url=url, headers=headers, json=req_body
) as response:
async for line in response.content:
msg = line.decode("utf-8")
if not msg.startswith("data:"):
continue
await span.add_info_event_async(f"recv: {msg}")
frame = _StreamResponse.model_validate_json(
msg.removeprefix("data:")
)
if frame.code != 0:
raise CustomException(
err_code=CodeEnum.RPA_REQUEST_ERROR,
err_msg=frame.message,
)
data = frame.data if frame.data is not None else {}
outputs.update(
{
output: data.get(output)
for output in self.output_identifier
if output in data
}
)
return NodeRunResult(
status=status,
inputs=inputs,
outputs=outputs,
node_id=self.node_id,
node_type=self.node_type,View on GitHub (pinned to 5e758547a8)