langchain-ai/langgraph · error · KeyError
{key}
Error message
{key} What it means
Error "{key}" thrown in langchain-ai/langgraph.
Source
Thrown at libs/langgraph/langgraph/types.py:398
interrupts: tuple[Interrupt, ...] = ()
def __getitem__(self, key: str) -> Any:
"""Backward compat: `result['__interrupt__']` and dict-key access."""
warn(
"Accessing GraphOutput via `result[key]` is deprecated. "
"Use `result.value` to access the output value directly, "
"or `result.interrupts` for interrupts.",
LangGraphDeprecatedSinceV11,
stacklevel=2,
)
if key == _INTERRUPT_KEY:
return self.interrupts
if isinstance(self.value, dict):
return self.value[key]
try:
return getattr(self.value, key)
except AttributeError:
raise KeyError(key)
def __contains__(self, key: object) -> bool:
warn(
"Accessing GraphOutput via `key in result` is deprecated. "
"Use `result.value` to access the output value directly, "
"or `result.interrupts` for interrupts.",
LangGraphDeprecatedSinceV11,
stacklevel=2,
)
if key == _INTERRUPT_KEY:
return bool(self.interrupts)
if isinstance(self.value, dict):
return key in self.value
return isinstance(key, str) and hasattr(self.value, key)
_DC_KWARGS = {"kw_only": True, "slots": True, "frozen": True}
View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/langgraph/langgraph/types.py:398 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/39eb914930f16898.
Report an issue: GitHub.