Error handling

3DS SDK Exceptions

According to the EMVCo 3DS SDK Specification, the Netcetera Android 3DS SDK throws four types of unchecked exceptions when some error has occurred. These exceptions are:

ExceptionDescription
InvalidInputExceptionThis exception represents error that is caused by invalidity of input provided to the 3DS SDK. It will contain message describing the cause.
SDKAlreadyInitializedExceptionThis exception represents error that is caused when initializing the ThreeDS2Service instance, but it has been already initialized.
SDKNotInitializedExceptionThis exception represents error that is caused when calling ThreeDS2Service method that requires it to be initialized, but it has not yet been initialized.
SDKRuntimeExceptionThis exception represents error that has occurred internally in the Netcetera Android 3DS SDK. It will contain message describing the cause. It will also contain error code that will provide better understanding of the cause of the error.

While in challenge flow, instead of throwing exceptions, the Netcetera 3DS SDK reports errors via ChallengeStatusReceiver.runtimeError(RuntimeErrorEvent). This RuntimeErrorEvent has both the error message that describes the cause and also error code.

Netcetera 3DS SDK Error Codes

The SDKRuntimeException and RuntimeErrorEvent besides having message that describes the cause of it, it also contains error code that can be used for debugging by the integrator or helpful information to the 3DS SDK Support Team when opening support ticket.

CodeDescription
Transaction errors
1010Called method on closed Transaction object. Check error message for what method was called.
1011Called method of Transaction object that has ongoing Challenge Flow. Check message for what method was called.
Configuration errors
1030Failed loading public key from DS Configuration. Check error message for the invalid value.
1031Invalid Drawable Resource ID provided in DS Configuration. Check error message for the invalid value.
1032No DS Configuration nor default values found for the required DS. Check error message for the DS missing configuration.
1034No API key configuration found. Please check Netcetera 3DS SDK integration documentation on how to configure it.
1035The API key is an invalid UUID string.
1322Failed registration of NcaBouncyCastleProvider. Provide org.bouncycastle:bcprov-jdk15to18:1.77 as a Gradle dependency
License validation errors
1050License for Netcetera 3DS SDK is missing.
1051, 1053License for Netcetera 3DS SDK is in invalid format.
1052License for Netcetera 3DS SDK has expired. Check error message for the validity period.
1056Netcetera 3DS SDK license is invalid for the selected product.
Device Data errors
1060The provided DS Encryption Key cannot be used because it is neither RSA nor EC type.
Challenge errors
2000ACS Signed Content verification failed.
2001ACS Signed Content signed with unsupported algorithm.
2002ACS Signed content has invalid signature.
2003ACS URL does not follow the HTTPS protocol.