Class StitchRequestException

  • All Implemented Interfaces:
    Serializable

    public class StitchRequestException
    extends StitchException
    Indicates that an error occurred while a request was being carried out. This could be due to (but is not limited to) an unreachable server, a connection timeout, or an inability to decode the result. An error code is included, which indicates whether the error was a transport error or decoding error. The inherited getCause() method from the Exception class can be used to produce that underlying error that caused a StitchRequestException. In the case of transport errors, these exception are thrown by the underlying Transport of the Stitch client. An error in decoding the result from the server is typically a IOException thrown internally by the Stitch SDK.
    See Also:
    Serialized Form
    • Constructor Detail

      • StitchRequestException

        public StitchRequestException​(String message,
                                      StitchRequestErrorCode errorCode)
        Constructs a request exception from an error code without an underlying exception.
        Parameters:
        message - a message describing the specific exception.
        errorCode - the request error code associated with this exception.
      • StitchRequestException

        public StitchRequestException​(Exception underlyingException,
                                      StitchRequestErrorCode errorCode)
        Constructs a request exception from the underlying exception and error code.
        Parameters:
        underlyingException - the underlying exception that caused this exception.
        errorCode - the request error code associated with this exception.