Class SDKError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.stackone.stackone_client_java.models.errors.StackOneError
-
- com.stackone.stackone_client_java.models.errors.SDKError
-
- All Implemented Interfaces:
java.io.Serializable
public class SDKError extends StackOneError
Thrown by a service call when an error response occurs. Contains details about the response.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SDKError(java.lang.String message, int code, byte[] body, java.net.http.HttpResponse<java.io.InputStream> rawResponse, java.lang.Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SDKErrorfrom(java.lang.String message, java.net.http.HttpResponse<java.io.InputStream> rawResponse)static SDKErrorfrom(java.lang.String message, java.net.http.HttpResponse<java.io.InputStream> rawResponse, java.lang.Throwable cause)java.net.http.HttpResponse<java.io.InputStream>rawResponse()Returns the raw HTTP response associated with this exception.-
Methods inherited from class com.stackone.stackone_client_java.models.errors.StackOneError
body, bodyAsString, code, headers, message, toString, withBody, withCode, withRawResponse
-
-
-
-
Method Detail
-
from
public static SDKError from(java.lang.String message, java.net.http.HttpResponse<java.io.InputStream> rawResponse)
-
from
public static SDKError from(java.lang.String message, java.net.http.HttpResponse<java.io.InputStream> rawResponse, @Nullable java.lang.Throwable cause)
-
rawResponse
public java.net.http.HttpResponse<java.io.InputStream> rawResponse()
Description copied from class:StackOneErrorReturns 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 classStackOneError- Returns:
- the raw HTTP response
-
-