Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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(): Returns ProvisioningServiceErrorCodes.

  • 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:

  1. Call getSdkErrorCode() to retrieve ProvisioningServiceErrorCodes.

  2. If the code equals COMMON_COMM_ERROR, call getHttpStatusCode().

  3. If the code equals COMMON_SERVER_ERROR, call getCpsErrorCode().

  4. Call getErrorMessage() to retrieve a descriptive message.

  5. If the error is card-specific, call getTokenId().

  6. 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:

  • KnownCpsErrorCodes

  • KnownMessageCode

The error codes and error messages listed here are not exhaustive.

Last updated

Was this helpful?