Class GraphRunnerException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.bsc.langgraph4j.GraphRunnerException
All Implemented Interfaces:
Serializable

public class GraphRunnerException extends Exception
Exception thrown when there is an error during the execution of a graph runner.
See Also:
  • Constructor Details

  • Method Details

    • config

      public RunnableConfig config()
    • nodeId

      public Optional<String> nodeId()
      Returns the identifier of the node that was being executed when the error occurred.

      The value is resolved from the RunnableConfig carried by this exception (metadata key RunnableConfig.NODE_ID). Unlike RunnableConfig.nodeId(), which throws when no node id is present, this accessor returns an empty Optional when the failure happens outside the scope of a specific node (for example, during entry-point resolution), so it is safe to call while handling a failure.

      Returns:
      an Optional containing the failing node id, or empty if it cannot be determined
      Since:
      1.9.0