public final class MsalServiceException extends MsalException
Set of error codes that could be returned from this exception:
SocketTimeoutException
.
Note: MsalServiceException
provides one extra API:
getHttpStatusCode()
: indicates the http status code for the failed request.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS_DENIED
The resource owner or authorization server denied the request.
|
static int |
DEFAULT_STATUS_CODE
When
SocketTimeoutException is thrown, no status code will be caught. |
static java.lang.String |
INVALID_INSTANCE
AuthorityMetadata validation failed.
|
static java.lang.String |
INVALID_REQUEST
This request is missing a required parameter, includes an invalid parameter, includes a parameter more than
once, or is otherwise malformed.
|
static java.lang.String |
INVALID_SCOPE
The request scope is invalid, unknown or malformed.
|
static java.lang.String |
REQUEST_TIMEOUT
Represents
SocketTimeoutException . |
static java.lang.String |
SERVICE_NOT_AVAILABLE
Represents 500/503/504 error codes.
|
static java.lang.String |
UNAUTHORIZED_CLIENT
The client is not authorized to request an authorization code.
|
static java.lang.String |
UNKNOWN_ERROR
Request to server failed, but no error and error_description is returned back from the service.
|
Constructor and Description |
---|
MsalServiceException(java.lang.String errorCode,
java.lang.String errorMessage,
int httpStatusCode,
java.lang.Throwable throwable) |
MsalServiceException(java.lang.String errorCode,
java.lang.String errorMessage,
java.lang.Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
int |
getHttpStatusCode() |
getErrorCode, getMessage
public static final java.lang.String INVALID_REQUEST
public static final java.lang.String UNAUTHORIZED_CLIENT
public static final java.lang.String ACCESS_DENIED
public static final java.lang.String INVALID_SCOPE
public static final java.lang.String SERVICE_NOT_AVAILABLE
public static final java.lang.String REQUEST_TIMEOUT
SocketTimeoutException
.public static final java.lang.String INVALID_INSTANCE
public static final java.lang.String UNKNOWN_ERROR
public static final int DEFAULT_STATUS_CODE
SocketTimeoutException
is thrown, no status code will be caught. Will use 0 instead.public MsalServiceException(java.lang.String errorCode, java.lang.String errorMessage, java.lang.Throwable throwable)
public MsalServiceException(java.lang.String errorCode, java.lang.String errorMessage, int httpStatusCode, java.lang.Throwable throwable)