new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

LangChain · LangGraph · all subjects

error handling

14 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Self-hosted 405 Method Not Allowed error fix

If receiving a 405 Method Not Allowed error with self-hosted LangSmith, ensure LANGSMITH_API_URL points to the /api-host path: export LANGSMITH_API_URL="https://your-instance.com/api-host"

Malformed OAuth callback URL troubleshooting

Ensure your OAuth provider's redirect URI matches your LangSmith instance URL format: https://your-instance.com/host-oauth-callback/{provider_id}. Mismatch causes malformed OAuth callback URL errors.

INVALID_CONCURRENT_GRAPH_UPDATE error cause

A LangGraph StateGraph throws the INVALID_CONCURRENT_GRAPH_UPDATE error when it receives concurrent updates to its state from multiple nodes to a state property that does not support concurrent updates. This typically occurs when using fanout or other parallel execution in a graph where multiple nodes running in the same step both return values for the same state key.

Concurrent state updates with non-reducible state key

When multiple nodes in parallel execution (such as a fanout) both return values for the same state key that is defined as a simple type like a string, the graph cannot determine how to merge these values and will raise an INVALID_CONCURRENT_GRAPH_UPDATE error due to this uncertainty.

Using reducers to handle concurrent state updates

To resolve the INVALID_CONCURRENT_GRAPH_UPDATE error when multiple nodes return values for the same state key in parallel execution, define that state key with a reducer function. In Python, use Annotated with a reducer like operator.add. In TypeScript, use ReducedValue with a reducer function. This allows the graph to combine multiple values according to the reducer logic instead of throwing an error.

Troubleshooting parallel execution state conflicts

If a graph executes nodes in parallel, ensure that any state keys that may be updated by multiple nodes in the same step are defined with a reducer function to handle the concurrent updates.

Increase recursionLimit in graph invocation (JavaScript)

To handle complex graphs that legitimately require many iterations, pass a higher recursionLimit value in the config object when invoking the graph. Example: await graph.invoke({...}, { recursionLimit: 1000 });

GRAPH_RECURSION_LIMIT error meaning

The GRAPH_RECURSION_LIMIT error occurs when a LangGraph StateGraph reaches the maximum number of steps before hitting a stop condition. This indicates the graph execution has exceeded the recursion limit threshold.

Infinite loop as common cause of GRAPH_RECURSION_LIMIT

The GRAPH_RECURSION_LIMIT error is often caused by an infinite loop in the graph logic, such as when edges create circular paths between nodes that never reach a termination condition.

Complex graphs may naturally hit recursion limit

Even without infinite loops, complex graphs with many legitimate iterations can hit the default recursion limit naturally.

Increase recursion_limit in graph invocation (Python)

To handle complex graphs that legitimately require many iterations, pass a higher recursion_limit value in the config object when invoking the graph. Example: graph.invoke({...}, {"recursion_limit": 1000})

Troubleshooting GRAPH_RECURSION_LIMIT: check for cycles

If the graph is not expected to go through many iterations, check the graph logic for infinite loops and cycles, as these are the likely cause of the GRAPH_RECURSION_LIMIT error.

INVALID_GRAPH_NODE_RETURN_VALUE error in Python

When a LangGraph StateGraph node returns a non-dict type, the error 'InvalidUpdateError: Expected dict, got [type]' is raised. The error message includes a troubleshooting URL: https://docs.langchain.com/oss/python/langgraph/errors/INVALID_GRAPH_NODE_RETURN_VALUE

INVALID_GRAPH_NODE_RETURN_VALUE error in JavaScript

When a LangGraph StateGraph node returns a non-object type, the error 'InvalidUpdateError: Expected object, got [type]' is raised. The error message includes a troubleshooting URL: https://langchain-ai.github.io/langgraphjs/troubleshooting/errors/INVALID_GRAPH_NODE_RETURN_VALUE

Give your agent this brain