Package dev.openfga.sdk.errors
Class ApiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- dev.openfga.sdk.errors.ApiException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FgaError
public class ApiException extends java.lang.Exception- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApiException()ApiException(int statusCode, java.lang.String message)ApiException(int statusCode, java.lang.String message, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)ApiException(int statusCode, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)ApiException(java.lang.String message)ApiException(java.lang.String message, int statusCode, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)ApiException(java.lang.String message, java.lang.Throwable throwable, int statusCode, java.net.http.HttpHeaders responseHeaders)ApiException(java.lang.String message, java.lang.Throwable throwable, int statusCode, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)ApiException(java.lang.String operationId, java.net.http.HttpResponse<java.lang.String> response)ApiException(java.lang.Throwable throwable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetResponseData()Get the HTTP response body.java.net.http.HttpHeadersgetResponseHeaders()Get the HTTP response headers.intgetStatusCode()Get the HTTP status code.
-
-
-
Constructor Detail
-
ApiException
public ApiException()
-
ApiException
public ApiException(java.lang.Throwable throwable)
-
ApiException
public ApiException(java.lang.String message)
-
ApiException
public ApiException(java.lang.String message, java.lang.Throwable throwable, int statusCode, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)
-
ApiException
public ApiException(java.lang.String message, int statusCode, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)
-
ApiException
public ApiException(java.lang.String message, java.lang.Throwable throwable, int statusCode, java.net.http.HttpHeaders responseHeaders)
-
ApiException
public ApiException(int statusCode, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)
-
ApiException
public ApiException(int statusCode, java.lang.String message)
-
ApiException
public ApiException(int statusCode, java.lang.String message, java.net.http.HttpHeaders responseHeaders, java.lang.String responseBody)
-
ApiException
public ApiException(java.lang.String operationId, java.net.http.HttpResponse<java.lang.String> response)
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Get the HTTP status code.- Returns:
- HTTP status code
-
getResponseHeaders
public java.net.http.HttpHeaders getResponseHeaders()
Get the HTTP response headers.- Returns:
- Headers as an HttpHeaders object
-
getResponseData
public java.lang.String getResponseData()
Get the HTTP response body.- Returns:
- Response body in the form of string
-
-