Error Handling

3DS SDK Errors

According to the EMVCo 3DS SDK Specification, the Netcetera iOS 3DS SDK throws the following error types:

ErrorDescription
Invalid InputThis error is caused by invalidity of input provided to the 3DS SDK. It will contain message describing the cause.
SDK Already InitializedThis error is caused when initializing a ThreeDS2Service instance that has been already initialized.
SDK Not InitializedThis error is caused when calling ThreeDS2Service method on an instance that has not yet been initialized.
SDK Runtime ErrorThis 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:

ExceptionError CodeDomain
Invalid input1000com.netcetera.ThreeDS-SDK
SDK Already Initialized1001com.netcetera.ThreeDS-SDK
SDK Not Initialized1002com.netcetera.ThreeDS-SDK
SDK runtime error1003com.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:

CodeDescription
Transaction errors
1010Called method on closed Transaction object.
1011Called doChallenge method on a Transaction object that already has an ongoing challenge flow.
1012Called close method on a Transaction object that has an ongoing challenge flow.
1013Failed to create transaction. Check error message for additional information.
1014Failed to initialize progress view.
Configuration errors
1031Logo image for a given directory server ID could not be found.
1032No DS Configuration nor default values found for the required DS. Check error message for more details.
1033Configuration validation failed.
1034Invalid UI customization type.
1035No API key configuration found. Please check the 3DS SDK configuration guide on how to configure it.
1036The API key is an invalid UUID string.
1037The configured API key is invalid.
License validation errors
1050License for Netcetera 3DS SDK is missing.
1051License for Netcetera 3DS SDK is in invalid format.
1052License for Netcetera 3DS SDK has expired. Check error message for the validity period.
1053License for Netcetera 3DS SDK has got an invalid signature.
1054Netcetera 3DS SDK license is invalid.
1055Netcetera 3DS SDK license is invalid for the selected product.
1056License is invalid for the current application.
General errors
1300The version of the Netcetera 3DS SDK could not be retrieved.
Challenge errors
2010An error occurred during the challenge flow.
2011An error occurred during the processing of the challenge.
2012The Netcetera 3DS SDK failed to handle the challenge response.
2013The Netcetera 3DS SDK failed to send the challenge request.
2014ACS 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 propertyDescription
domainThe error domain
codeThe error code
localizedDescriptionThe error message
localizedFailureReasonInternal failure reason error code (SDKRuntime error only)