langchain-ai/langgraph · error · Exception
{response['__error__'].get('error')}…
Error message
{response['__error__'].get('error')}: {response['__error__'].get('message')} What it means
Server-error propagation in the async runs client: when raise_error is enabled and the streamed response dict contains an '__error__' envelope, the client re-raises it locally as an exception combining the server's error name and message. It is a transport-level wrapper, not a local validation failure.
Solutions
- Inspect the error name/message for the server-side cause (e.g. graph not found, invalid input) and fix the request
- Pass on_run_error or check the run's status to handle failures without raising
- Retry transient server errors once the underlying cause is resolved
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at libs/sdk-py/langgraph_sdk/_async/runs.py:849 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/38eb4da8541fdd31.
Report an issue: GitHub.
Appendix: source
Thrown at libs/sdk-py/langgraph_sdk/_async/runs.py:849
"""Callback function to handle the response."""
if on_run_created and (metadata := _get_run_metadata_from_response(res)):
on_run_created(metadata)
response = await self.http.request_reconnect(
endpoint,
"POST",
json={k: v for k, v in payload.items() if v is not None},
params=params,
headers=headers,
on_response=on_response if on_run_created else None,
)
if (
raise_error
and isinstance(response, dict)
and "__error__" in response
and isinstance(response["__error__"], dict)
):
raise Exception(
f"{response['__error__'].get('error')}: {response['__error__'].get('message')}"
)
return response
async def list(
self,
thread_id: str,
*,
limit: int = 10,
offset: int = 0,
status: RunStatus | None = None,
select: builtins.list[RunSelectField] | None = None,
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None,
) -> builtins.list[Run]:
"""List runs.
Args:View on GitHub (pinned to 38031739e5)