public final class StitchServiceException extends StitchException
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.
Constructor and Description |
---|
StitchServiceException(StitchServiceErrorCode errorCode)
Constructs a new exception with the given error code.
|
StitchServiceException(String message,
StitchServiceErrorCode errorCode)
Constructs a new exception with the given message error code.
|
Modifier and Type | Method and Description |
---|---|
StitchServiceErrorCode |
getErrorCode()
Returns the
StitchServiceErrorCode associated with the response to the request. |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public StitchServiceException(StitchServiceErrorCode errorCode)
errorCode
- the service error code associated with this exception.public StitchServiceException(String message, StitchServiceErrorCode errorCode)
message
- a message corresponding to the error.errorCode
- the service error code associated with this exception.public StitchServiceErrorCode getErrorCode()
StitchServiceErrorCode
associated with the response to the request.StitchServiceErrorCode
associated with the response to the request.