Error Handling
3DS SDK Errors
According to the EMVCo 3DS SDK Specification, the Netcetera iOS 3DS SDK throws the following error types:
Error | Description |
---|---|
Invalid Input | This error is caused by invalidity of input provided to the 3DS SDK. It will contain message describing the cause. |
SDK Already Initialized | This error is caused when initializing a ThreeDS2Service instance that has been already initialized. |
SDK Not Initialized | This error is caused when calling ThreeDS2Service method on an instance that has not yet been initialized. |
SDK Runtime Error | This error is thrown when an error occurs internally in the Netcetera iOS 3DS SDK. It contains a message describing the cause and error code that provides better understanding of the cause of the error. |
Netcetera 3DS SDK Error Codes
Because the SDK supports both Swift and Objective-C, the errors that are thrown from the 3DS SDK are NSError objects. They all contain an error code and localized description with the error message. The error codes for all of the above mentioned errors are:
Exception | Error Code | Domain |
---|---|---|
Invalid input | 1000 | com.netcetera.ThreeDS-SDK |
SDK Already Initialized | 1001 | com.netcetera.ThreeDS-SDK |
SDK Not Initialized | 1002 | com.netcetera.ThreeDS-SDK |
SDK runtime error | 1003 | com.netcetera.ThreeDS-SDK |
All errors belong to the same domain. The type of the error is defined with the error code.
The SDKRuntime
error and RuntimeErrorEvent
also contain localized failure reason message with error code. The error code can be used for debugging by the integrator or to provide helpful information to the 3DS SDK Support Team when opening support ticket. The public error codes that can be returned from the SDK are:
Code | Description |
---|---|
Transaction errors | |
1010 | Called method on closed Transaction object. |
1011 | Called doChallenge method on a Transaction object that already has an ongoing challenge flow. |
1012 | Called close method on a Transaction object that has an ongoing challenge flow. |
1013 | Failed to create transaction. Check error message for additional information. |
1014 | Failed to initialize progress view. |
Configuration errors | |
1031 | Logo image for a given directory server ID could not be found. |
1032 | No DS Configuration nor default values found for the required DS. Check error message for more details. |
1033 | Configuration validation failed. |
1034 | Invalid UI customization type. |
1035 | No API key configuration found. Please check the 3DS SDK configuration guide on how to configure it. |
1036 | The API key is an invalid UUID string. |
1037 | The configured API key is invalid. |
License validation errors | |
1050 | License for Netcetera 3DS SDK is missing. |
1051 | License for Netcetera 3DS SDK is in invalid format. |
1052 | License for Netcetera 3DS SDK has expired. Check error message for the validity period. |
1053 | License for Netcetera 3DS SDK has got an invalid signature. |
1054 | Netcetera 3DS SDK license is invalid. |
1055 | Netcetera 3DS SDK license is invalid for the selected product. |
1056 | License is invalid for the current application. |
General errors | |
1300 | The version of the Netcetera 3DS SDK could not be retrieved. |
Challenge errors | |
2010 | An error occurred during the challenge flow. |
2011 | An error occurred during the processing of the challenge. |
2012 | The Netcetera 3DS SDK failed to handle the challenge response. |
2013 | The Netcetera 3DS SDK failed to send the challenge request. |
2014 | ACS URL does not follow the HTTPS protocol. |
Note: It is possible for the 3DS SDK to throw a public error code (listed in the table above) concatenated with an internal error code. The error codes are separated with a dash delimiter (-) and the public error code is always placed first which is then followed by one or multiple dash separated internal error codes. Example: 1300-101
where 1300 is the public error code and 101 is the concatenated internal error.
The error values of the SDKRuntime
errors can be retrieved from the NSError properties.
NSError property | Description |
---|---|
domain | The error domain |
code | The error code |
localizedDescription | The error message |
localizedFailureReason | Internal failure reason error code (SDKRuntime error only) |