{"record":{"id":"5746b8cd3f44415e","repo":"iflytek/astron-agent","slug":"e-execution","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"core/plugin/rpa/api/v1/execution.py","lineNumber":59,"sourceCode":"        return EventSourceResponse(\n            task_monitoring(\n                sid=request.sid,\n                access_token=acctss_token,\n                project_id=request.project_id,\n                version=request.version,\n                phone_number=request.phone_number,\n                exec_position=request.exec_position,\n                params=request.params,\n            ),\n            headers=headers,\n            ping=ping_interval,\n        )\n    except json.JSONDecodeError as e:\n        raise HTTPException(\n            status_code=400, detail=f\"Invalid JSON format for 'params':\" f\" {e}\"\n        ) from e\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=str(e)) from e\n","sourceCodeStart":41,"sourceCodeEnd":60,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/plugin/rpa/api/v1/execution.py#L41-L60","documentation":"The catch-all branch of exec_fun: any exception other than JSONDecodeError during request execution (upstream errors, websocket/network failures, unexpected task states) is converted to HTTP 500 with detail=str(e). The message is just the stringified exception, so the underlying cause must be read from the detail.","triggerScenarios":"Any failure while establishing or using the RPA execution channel after params parsed OK — connection refused to the RPA backend, auth failures, timeouts, unexpected None/attribute errors inside exec_fun.","commonSituations":"RPA backend service down or unreachable; invalid/expired bearer token causing upstream rejection; network partitions in the cluster; bugs inside exec_fun raising TypeError/KeyError.","solutions":["Read the HTTP 500 detail string to identify the underlying exception","Check that the RPA backend service is running and reachable from the plugin","Verify the Authorization token is valid and not expired","Inspect service logs around the request for the full traceback (detail is truncated to str(e))"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = client.execute(params, headers=headers)\nexcept http.HTTPStatusError as e:\n    detail = e.response.json().get(\"detail\")\n    logger.error(\"RPA exec failed: %s\", detail)\n    # retry or alert based on detail content","preventionTips":["Log response 'detail' — it carries the underlying exception message","Health-check the RPA backend before dispatching executions","Refresh bearer tokens before expiry to avoid upstream auth failures"],"tags":["fastapi","http-500","unhandled-exception"],"backgroundTag":"api-error-response","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"}