Skip to main content

Android SDK Errors

The Android Weavr Provisioning SDK wraps errors within a class called WPPException.

This exception is not thrown, but rather wrapped within an Outcome.Failure type.

The main way to identify which error occurred is via the WPPException.code and WPPException.domain properties.

The first one is an integer representing which error occurred, while the second identifies which subsystem created the error.

Additionally, extra data may be included, and an exception may occur in WPPException.extraData and WPPException.cause.

Potential error codes

All potential error codes are gathered in WeavrSDKErrorCodes.

The following table lists all potential error codes that the SDK may throw:

Error CodeValueDescription
SDK_NOT_INITIALISED1000The SDK was not initialised before calling a method.
CARD_NOT_PROVISIONED1001The card is not provisioned.
NETWORK_ERROR1002There is no network connection.
CARD_NOT_ELIGIBLE1003The card is not eligible to be provisioned.
MISSING_ADD_TO_WALLET_DRAWABLE2001The AddToWalletButton is missing the required drawable resource. Ensure you have set a drawable resource when creating the button.
UNAUTHORIZED2002The provisioning failed because the token is unauthorized.
MISSING_CARD_ID2003The AddToWalletButton is missing the required card ID.
MISSING_CARD_BRAND2004The AddToWalletButton is missing the required card brand.
MISSING_CARD_LAST_FOUR_DIGITS2005The AddToWalletButton is missing the required last four digits of the card.
MISSING_CARD_HOLDER_NAME2006The AddToWalletButton is missing the required card holder name.
MISSING_CARD_DESCRIPTION2007The AddToWalletButton is missing the required card description.
GOOGLE_PAY_PROVISIONING_PAYLOAD_ERROR3001There was a problem with the Google Pay SDK.
INSECURE_DEVICE_ERROR3002The device is not considered secure. This can be triggered in scenarios such as debugging attached to the device, unsupported OS versions, or failed hardware ID retrieval.
CLIENT_NOT_AVAILABLE_ERROR3003The client is not available.
GOOGLE_PAY_ERROR3004There was a problem with the Google Pay SDK.
GOOGLE_PAY_TOKEN_ALREADY_EXISTS3005The Google Pay token is already provisioned.
GOOGLE_PAY_TOKEN_NOT_FOUND3006The Google Pay token was not found.
SETUP_ERROR4001There's a setup issue within the app.
INVALID_ACTIVITY5001The activity provided is invalid. A FragmentActivity, preferably an AppCompatActivity, is expected.
UNKNOWN_ERROR-1An unknown error occurred.