Class StitchServiceException

  • All Implemented Interfaces:
    Serializable

    public final class StitchServiceException
    extends StitchException
    A StitchServiceException is an exception indicating that an error came from the Stitch server after a request was completed, with an error message and an error code defined in the `StitchServiceErrorCode` enum.

    It is possible that the error code will be `UNKNOWN`, which can mean one of several possibilities: the Stitch server returned a message that this version of the SDK does not yet recognize, the server is not a Stitch server and returned an unexpected message, or the response was corrupted. In these cases, the associated message will be the plain text body of the response, or an empty string if the body is empty or not decodable as plain text.

    See Also:
    Serialized Form
    • Constructor Detail

      • StitchServiceException

        public StitchServiceException​(StitchServiceErrorCode errorCode)
        Constructs a new exception with the given error code.
        Parameters:
        errorCode - the service error code associated with this exception.
      • StitchServiceException

        public StitchServiceException​(String message,
                                      StitchServiceErrorCode errorCode)
        Constructs a new exception with the given message error code.
        Parameters:
        message - a message corresponding to the error.
        errorCode - the service error code associated with this exception.