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.
class StateGraphInputError// Example of incorrect usage:
try {
new StateGraph({ foo: "bar" }); // Not a valid input
} catch (err) {
if (err instanceof StateGraphInputError) {
console.error(err.message);
}
}The name of the task, analogous to the node name in StateGraph.