Skip to main content

SDK errors (Android push provisioning)

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 CodeScenarioRecommended Action
SDK_NOT_INITIALISED (1000)Initialisation missingInitialise in application before any call.
CARD_NOT_PROVISIONED (1001)Attempting to set default for unknown cardPrompt user to add card first.
NETWORK_ERROR (1002)Connectivity issuesRetry with backoff; surface offline state.
CARD_NOT_ELIGIBLE (1003)Backend flagged card ineligibleShow user-friendly message; escalate to issuer.
COULD_NOT_FETCH_PROVIDER (1004)Missing routing dataValidate backend response and provisioning config.
MISSING_\* (2001–2007)AddToWalletButton missing parametersEnsure all fields set before user taps.
GOOGLE_PAY_\* (3001–3006)Google Pay SDK issuesProvide fallback or retry guidance.
SETUP_ERROR (4001)Local app misconfigurationRevisit installation steps.
INVALID_ACTIVITY (5001)Non-FragmentActivity hostUse AppCompatActivity or attach fragment correctly.
UNKNOWN_ERROR (-1)Unmapped exceptionCapture logs for support.