{"record":{"id":"7267d65545adc860","repo":"sgl-project/sglang","slug":"response-error","errorCode":null,"errorMessage":"{response.error}","messagePattern":"\\{response\\.error\\}","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/entrypoints/action/protocol.py","lineNumber":422,"sourceCode":"            payload,\n            _action_request_to_observation(payload),\n            server_args,\n            sampling_params_cls,\n        )\n    raise ValueError(\n        f\"Action endpoint is not implemented for {sampling_params_cls.__name__}\"\n    )\n\n\nasync def infer_action(\n    payload: dict[str, Any],\n    server_args: ServerArgs,\n) -> dict[str, Any]:\n    sp = build_action_sampling_params(payload, server_args)\n    req = prepare_request(server_args, sp)\n    response = await async_scheduler_client.forward(req)\n    if getattr(response, \"error\", None):\n        raise RuntimeError(response.error)\n    if response.output is None:\n        raise RuntimeError(\"action policy returned no output\")\n    return response.output[0]\n\n\ndef action_generation_response(\n    output: dict[str, Any],\n    server_args: ServerArgs,\n    *,\n    preserve_numpy: bool = False,\n) -> dict[str, Any]:\n    actions = output[\"actions\"]\n    action_array = np.asarray(actions)\n    if any(size == 0 for size in action_array.shape):\n        raise ValueError(\n            \"action output dimensions must be non-zero, got \"\n            f\"{tuple(action_array.shape)}\"\n        )","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/entrypoints/action/protocol.py#L404-L440","documentation":"Raised by infer_action when the scheduler response carries a non-empty `error` field after forwarding an action-inference request. The scheduler/client side reported a failure (e.g. model error, request rejected, backend exception) and this endpoint propagates it as a RuntimeError with the upstream message. It means the request reached the scheduler but failed during policy inference.","triggerScenarios":"Calling create_action_generation or the action msgpack WebSocket endpoint (run_action_msgpack_ws) when async_scheduler_client.forward(req) returns a response object whose `.error` attribute is set — e.g. malformed sampling params rejected server-side, model load failure, or an inference exception in the action policy model.","commonSituations":"Server-side model exceptions (OOM, checkpoint mismatch), invalid sampling parameters built by build_action_sampling_params, scheduler restarting or partially crashed mid-request, version mismatch between client protocol and scheduler.","solutions":["Inspect the propagated response.error string — it contains the underlying scheduler-side failure message; fix that root cause","Verify the action policy model is loaded correctly on the scheduler (check server logs around the failing request)","Check that payload/server_args passed to build_action_sampling_params produce valid sampling parameters","Restart or reconnect to the scheduler if it crashed mid-request"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"resp = await async_scheduler_client.forward(ping_req)\nif getattr(resp, \"error\", None):\n    # surface or retry before running real inference\n    ...","typeGuard":null,"tryCatchPattern":"try:\n    out = await infer_action(client, payload, server_args)\nexcept RuntimeError as e:\n    log.error(\"action inference failed: %s\", e)\n    # degrade gracefully / retry with backoff if transient","preventionTips":["Health-check the scheduler before submitting action requests","Validate sampling params client-side before building the request","Wrap action endpoints so upstream scheduler errors are surfaced as 5xx with the propagated message"],"tags":["action-inference","scheduler","runtime-error","propagated-error"],"backgroundTag":"backend-inference-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}