Class ExternalServiceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
ro.sync.exml.plugin.ai.ExternalServiceException
All Implemented Interfaces:
Serializable

@API(type=NOT_EXTENDABLE, src=PUBLIC) public class ExternalServiceException extends Exception
Exception thrown when an error occurs while interacting with an external service.

This exception is typically used when an error arises during the execution of a tool (external AI function), such as failures in making external API calls, issues in processing data, or errors in service communication.

This class includes an isFatal flag to indicate whether the error is severe enough to stop further AI interactions or other functions executions.

Since:
27

**************************************
EXPERIMENTAL - Subject to change
**************************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.

See Also:
  • Constructor Details

    • ExternalServiceException

      public ExternalServiceException(String message, boolean isFatal)
      Constructs a new ExternalServiceException with the specified detail message and fatal flag.
      Parameters:
      message - the detail message explaining the cause of the exception.
      isFatal - a flag indicating if the exception is fatal and should stop further execution.
    • ExternalServiceException

      public ExternalServiceException(String message, Throwable cause, boolean isFatal)
      Constructs a new ExternalServiceException with the specified detail message, cause, and fatal flag.
      Parameters:
      message - the detail message explaining the cause of the exception.
      cause - the cause of the exception (a Throwable object).
      isFatal - a flag indicating if the exception is fatal and should stop further execution.
  • Method Details

    • isFatal

      public boolean isFatal()
      Returns whether the exception is considered fatal.

      If true, it indicates that the error is critical and further interaction with the AI or further tool executions should be halted. If false, it means the error is non-fatal and the system can recover or continue executing other tasks.

      Returns:
      true if the exception is fatal; false otherwise.