Class GaosApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.google.genai.errors.ApiException
com.google.genai.gaos.models.errors.GaosBaseException
com.google.genai.gaos.models.errors.GaosApiException
- All Implemented Interfaces:
Serializable
Thrown by a service call when an error response occurs. Contains details about the response.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGaosApiException(String message, int code, byte[] body, HttpResponse<InputStream> rawResponse, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic GaosApiExceptionfrom(String message, HttpResponse<InputStream> rawResponse) static GaosApiExceptionfrom(String message, HttpResponse<InputStream> rawResponse, Throwable cause) Returns the raw HTTP response associated with this exception.Methods inherited from class com.google.genai.gaos.models.errors.GaosBaseException
body, bodyAsString, code, headers, message, toString, withBody, withCode, withRawResponseMethods inherited from class com.google.genai.errors.ApiException
status, throwFromErrorNode, throwFromResponseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
GaosApiException
public GaosApiException(String message, int code, @Nullable byte[] body, HttpResponse<InputStream> rawResponse, @Nullable Throwable cause)
-
-
Method Details
-
from
-
from
public static GaosApiException from(String message, HttpResponse<InputStream> rawResponse, @Nullable Throwable cause) -
rawResponse
Description copied from class:GaosBaseExceptionReturns the raw HTTP response associated with this exception. The response body stream may not be available (but the body can be accessed via thebody()method).- Overrides:
rawResponsein classGaosBaseException- Returns:
- the raw HTTP response
-