Class ChatCompletionsHttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.google.adk.models.chat.ChatCompletionsHttpException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionChatCompletionsHttpException(int statusCode, String message, String responseBody) -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ChatCompletionsHttpException
-
-
Method Details
-
statusCode
public int statusCode() -
responseBody
-