MsalServiceException Class
- java.
lang. Object - java.
lang. Throwable - java.
lang. Exception - java.
lang. RuntimeException - com.
microsoft. aad. msal4j. MsalException - com.
microsoft. aad. msal4j. MsalServiceException
- com.
- com.
- java.
- java.
- java.
public class MsalServiceException
extends MsalException
Exception type thrown when service returns an error response or other networking errors occur.
Constructor Summary
Constructor | Description |
---|---|
MsalServiceException(AadInstanceDiscoveryResponse discoveryResponse) |
Initializes a new instance of the exception class |
MsalServiceException(ErrorResponse errorResponse, Map<String,List<String>> httpHeaders) |
Initializes a new instance of the exception class |
MsalServiceException(String message, String error) |
Initializes a new instance of the exception class with a specified error message |
MsalServiceException(String message, String error, ManagedIdentitySourceType managedIdentitySource) |
Initializes a new instance of the exception class, with any extra properties for a Managed Identity error |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
claims()
Claims included in the claims challenge |
java.lang.String |
correlationId()
An ID that can be used to piece up a single authentication flow. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
headers()
Contains the http headers from the server response that indicated an error. |
java.lang.String | managedIdentitySource() |
java.lang.Integer |
statusCode()
Status code returned from http layer |
java.lang.String |
statusMessage()
Status message returned from the http layer |
Methods inherited from MsalException
Methods inherited from java.lang.Object
Methods inherited from java.lang.Throwable
Constructor Details
MsalServiceException
public MsalServiceException(AadInstanceDiscoveryResponse discoveryResponse)
Initializes a new instance of the exception class
Parameters:
MsalServiceException
public MsalServiceException(ErrorResponse errorResponse, Map
Initializes a new instance of the exception class
Parameters:
MsalServiceException
public MsalServiceException(String message, String error)
Initializes a new instance of the exception class with a specified error message
Parameters:
MsalServiceException
public MsalServiceException(String message, String error, ManagedIdentitySourceType managedIdentitySource)
Initializes a new instance of the exception class, with any extra properties for a Managed Identity error
Parameters:
Method Details
claims
public String claims()
Claims included in the claims challenge
correlationId
public String correlationId()
An ID that can be used to piece up a single authentication flow.
headers
public Map
Contains the http headers from the server response that indicated an error. When the server returns a 429 Too Many Requests error, a Retry-After should be set. It is important to read and respect the time specified in the Retry-After header
managedIdentitySource
public String managedIdentitySource()
statusCode
public Integer statusCode()
Status code returned from http layer
statusMessage
public String statusMessage()
Status message returned from the http layer