Class GeminiInteractionsException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.glaforge.gemini.interactions.GeminiInteractionsException
All Implemented Interfaces:
Serializable

public class GeminiInteractionsException extends RuntimeException
Exception thrown when the Gemini Interactions API returns an error response.
See Also:
  • Constructor Details

    • GeminiInteractionsException

      public GeminiInteractionsException(String message, int statusCode, String body)
      Constructs a new exception with the specified message, status code, and body.
      Parameters:
      message - The error message.
      statusCode - The HTTP status code.
      body - The response body.
    • GeminiInteractionsException

      public GeminiInteractionsException(String message, Throwable cause)
      Constructs a new exception with the specified message and cause.
      Parameters:
      message - The error message.
      cause - The cause of the exception.
    • GeminiInteractionsException

      public GeminiInteractionsException(Throwable cause)
      Constructs a new exception with the specified cause.
      Parameters:
      cause - The cause of the exception.
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Returns the HTTP status code returned by the API.
      Returns:
      The HTTP status code.
    • getBody

      public String getBody()
      Returns the response body returned by the API.
      Returns:
      The response body.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable