OvokException
Base class of every exception the SDK throws; carries the API's error details when there is a response.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public class OvokException extends RuntimeExceptionBase class of every exception the SDK throws; carries the API's error details when there is a response.
Constructors
OvokException
public OvokException(String message)Creates an exception with only a message.
Parameters:
message: the error message
public OvokException(
String message,
Integer status,
String code,
String type,
String traceId,
String requestId,
Duration retryAfter,
String body,
Throwable cause)Creates an exception with the API's error details.
Parameters:
message: the error messagestatus: the HTTP status, ornullcode: the error code from the response body, ornulltype: the error type from the response body, ornulltraceId: thex-trace-idresponse header, ornullrequestId: thex-request-idresponse header, ornullretryAfter: theRetry-Afterdelay, ornullbody: the raw response body, ornullcause: the underlying cause, ornull
Methods
status
public Integer status()Returns the HTTP status.
Returns: the status, or null when there was no response
code
public String code()Returns the error code from the response body.
Returns: the code, or null
type
public String type()Returns the error type from the response body.
Returns: the type, or null
traceId
public String traceId()Returns the x-trace-id response header, for support requests.
Returns: the trace id, or null
requestId
public String requestId()Returns the x-request-id response header, for support requests.
Returns: the request id, or null
retryAfter
public Duration retryAfter()Returns how long to wait before retrying, from the Retry-After header.
Returns: the delay, or null when the response did not set one
body
public String body()Returns the raw response body.
Returns: the body, or null
Last updated on