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().
Other errors have a similar structure. For details, refer to Android API.
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
The error codes and error messages listed here are not exhaustive.
Do not automatically retry the same request when you receive these errors. Inform the end user. Ask them to contact your support team with the server error code.
Last updated
Was this helpful?