ProvisioningServiceError
Overview
During Tokenization, you use ProvisioningServiceManager. If an operation fails, the SDK throws ProvisioningServiceError.
Use ProvisioningServiceError to read the error category and details:
getSdkErrorCode(): ReturnsProvisioningServiceErrorCodes.getCpsErrorCode(): Returns the CPS server error code.getHttpStatusCode(): Returns the HTTP status code.getErrorMessage(): Returns a human-readable message.getTokenId(): Returns the token ID, when card-specific.getStatusAdditionalInfo(): Returns additional CPS request details, when available.
This section shows how to parse the error.
Parse the error
When the SDK throws ProvisioningServiceError, parse it as follows:
Call
getSdkErrorCode()to retrieveProvisioningServiceErrorCodes.If the code equals
COMMON_COMM_ERROR, callgetHttpStatusCode().If the code equals
COMMON_SERVER_ERROR, callgetCpsErrorCode().Call
getErrorMessage()to retrieve a descriptive message.If the error is card-specific, call
getTokenId().If the error is related to a CPS request, call
getStatusAdditionalInfo().
Review all values in ProvisioningServiceErrorCodes in Android API. For example:
COMMON_COMM_TIMEOUT_ERROR: Connection timeout when opening a server connection.COMMON_NO_INTERNET: No data connection available.
Server error details
When you receive COMMON_SERVER_ERROR, call getCpsErrorCode(). Also call getErrorMessage().
Use these classes for known server error codes and messages:
KnownCpsErrorCodesKnownMessageCode
Last updated
Was this helpful?