Error thrown when invalid input is provided to a StateGraph.
This typically means that the input to the StateGraph constructor or builder
did not match the required types. A valid input should be a
StateDefinition, an Annotation.Root, or a Zod schema.
Example
// Example of incorrect usage: try { newStateGraph({ foo:"bar" }); // Not a valid input } catch (err) { if (errinstanceofStateGraphInputError) { console.error(err.message); } }
Error thrown when invalid input is provided to a StateGraph.
This typically means that the input to the StateGraph constructor or builder did not match the required types. A valid input should be a StateDefinition, an Annotation.Root, or a Zod schema.
Example