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:
Exception | Description |
---|---|
InvalidInputException | This exception represents error that is caused by invalidity of input provided to the 3DS SDK. It will contain message describing the cause. |
SDKAlreadyInitializedException | This exception represents error that is caused when initializing the ThreeDS2Service instance, but it has been already initialized. |
SDKNotInitializedException | This exception represents error that is caused when calling ThreeDS2Service method that requires it to be initialized, but it has not yet been initialized. |
SDKRuntimeException | This 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.
Code | Description |
---|---|
Transaction errors | |
1010 | Called method on closed Transaction object. Check error message for what method was called. |
1011 | Called method of Transaction object that has ongoing Challenge Flow. Check message for what method was called. |
Configuration errors | |
1030 | Failed loading public key from DS Configuration. Check error message for the invalid value. |
1031 | Invalid Drawable Resource ID provided in DS Configuration. Check error message for the invalid value. |
1032 | No DS Configuration nor default values found for the required DS. Check error message for the DS missing configuration. |
License validation errors | |
1050 | License for Netcetera 3DS SDK is missing. |
1051, 1053, 1054 | License for Netcetera 3DS SDK is in invalid format. |
1052 | License for Netcetera 3DS SDK has expired. Check error message for the validity period. |
Device Data errors | |
1060 | The provided DS Encryption Key cannot be used because it is neither RSA nor EC type. |
Challenge errors | |
2000 | ACS Signed Content verification failed. |
2001 | ACS Signed Content signed with unsupported algorithm. |
2002 | ACS Signed content has invalid signature. |
2003 | ACS URL does not follow the HTTPS protocol. |