Class ChatCompletionsHttpException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.google.adk.models.chat.ChatCompletionsHttpException
All Implemented Interfaces:
Serializable

public final class ChatCompletionsHttpException extends IOException
Thrown by ChatCompletionsHttpClient when the server returns a non-successful HTTP status code. Extends IOException so existing catch (IOException) call sites continue to work without modification. Callers that need to branch on the HTTP status (e.g. to apply bounded retry/backoff on 429) can catch this subtype and call statusCode() directly, without parsing Throwable.getMessage().
See Also:
  • Constructor Details

    • ChatCompletionsHttpException

      public ChatCompletionsHttpException(int statusCode, String message, String responseBody)
  • Method Details

    • statusCode

      public int statusCode()
    • responseBody

      public String responseBody()