Class AsyncSDKError

  • All Implemented Interfaces:
    java.io.Serializable

    public class AsyncSDKError
    extends StackOneError
    Thrown by an async service call when an error response occurs. Contains details about the response. This is an unchecked exception suitable for use in CompletableFuture chains.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncSDKError​(java.lang.String message, int code, byte[] body, java.net.http.HttpResponse<Blob> rawResponse, java.lang.Throwable cause)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.http.HttpResponse<Blob> rawResponse()
      Returns the raw HTTP response associated with this exception.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AsyncSDKError

        public AsyncSDKError​(java.lang.String message,
                             int code,
                             @Nullable
                             byte[] body,
                             java.net.http.HttpResponse<Blob> rawResponse,
                             @Nullable
                             java.lang.Throwable cause)
    • Method Detail

      • rawResponse

        public java.net.http.HttpResponse<Blob> rawResponse()
        Description copied from class: StackOneError
        Returns the raw HTTP response associated with this exception. The response body stream may not be available (but the body can be accessed via the body() method).
        Overrides:
        rawResponse in class StackOneError
        Returns:
        the raw HTTP response