Class AiException

java.lang.Object
java.lang.Throwable
java.lang.Exception
io.github.jbastgen.stemma.app.ai.AiException
All Implemented Interfaces:
Serializable

public final class AiException extends Exception
A request to an AI service failed. The message is meant for the user and never contains the API key.
See Also:
  • Constructor Details

    • AiException

      public AiException(String message, boolean retryable)
      Parameters:
      message - what went wrong, in words for the user
      retryable - whether trying again may help (a timeout, an overloaded server)
    • AiException

      public AiException(String message, boolean retryable, Throwable cause)
      Parameters:
      message - what went wrong, in words for the user
      retryable - whether trying again may help
      cause - the technical reason
  • Method Details

    • retryable

      public boolean retryable()
      Whether trying again may help (network trouble, an overloaded service).