Code

public enum Code : Int, CaseIterable

D1 error codes.

Note

D1 SDK returns one of these error codes for each D1Error.

Since

1.0.0

  • The operation has been cancelled.

    Declaration

    Swift

    case cancelled = 10001
  • The end user is not logged in or the login validity has expired. Please get the end user to log in before performing subsequent requests.

    Note

    Proceed to log in before performing subsequent requests. If the end user were already logged in, end user would need to login again.

    Declaration

    Swift

    case notLoggedIn = 10005
  • The end user is not authorized to perform this operation. Verify that the parameters requested are correct.

    Note

    Retry the operation again.

    Declaration

    Swift

    case notAuthorized = 10006
  • The device environment is potentially unsafe. Please ensure that the device environment is safe.

    Note

    Ensure that the device environment is safe.

    Declaration

    Swift

    case deviceEnvironmentUnsafe = 10007
  • The cardID provided is not found. Please ensure that the cardID is correct.

    Note

    Integrator should ensure that the cardID is correct.

    Declaration

    Swift

    case cardNotFound = 10009
  • The consumer/card is not active. Please ensure that the consumer/card is active.

    Note

    Integrator should ensure that the consumer/card is active.

    Declaration

    Swift

    case notActive = 10010
  • Error encountered whilst executing core operations. It is caused by storage (unlikely) or network failure.

    Note

    Integrator should check the underlying errors for more details. Ensure that the device has internet connection.

    Declaration

    Swift

    case core = 20001
  • Card activation methods for this card are not found.

    Note

    Integrator should first retrieve the activation method for this card.

    Declaration

    Swift

    case noCardActivationMethod = 20002
  • The required UI component was not found.

    Note

    Integrator should provide the necessary UI component.

    Declaration

    Swift

    case uiComponentNotFound = 20003
  • There was a mismatch with the PIN inputs.

    Note

    Integrator should ensure that the provided PINs are identical.

    Declaration

    Swift

    case pinMismatch = 20004
  • The keychain operation is failing and it’s unrecoverable. It could be caused by the device passcode has been turned-off and the end user is continue to perform any D1 operation (i.e: login).

    Note

    Integrator should perform the reset function to clean up the keychain. Ensure passcode is turned-on before perform any D1 operation.

    Since

    3.0.0 case unrecoverable = 20006

    Declaration

    Swift

    case unrecoverable = 20006
  • Risk assessment failed.

    Category - Risk API

    Note

    Integrator should check the underlying errors for more details. Ensure that the risk credentials are correct and the device has an internet connection.

    Remark

    D1Task.Components.riskURLString, D1Task.Components.riskClientID

    Declaration

    Swift

    case risk = 30001
  • Errors encountered whilst executing card operations. For underlying error with domain PKPassKitErrorDomain, please refer to Apple documentation for more details.

    Category - Card API

    Note

    Integrator should check the underlying errors for more details. Ensure that the card configurations are correct and the device has internet connection.

    Remark

    D1TaskComponents.digitalCardURLString, D1TaskComponents.issuerID

    Declaration

    Swift

    case card = 40001
  • The feature is not supported. This can be due to a variety of reasons. For example, hardware functionality, and parental control restriction.

    Category - Card API

    Note

    Integrator should display information to end user on why it is not supported.

    Declaration

    Swift

    case cardNotSupported = 40002
  • No pending activation of the digital card. No digital card is found with CardDigitizationState equal to CardDigitizationState.pendingIDVLocal or CardDigitizationState.pendingIDVRemote.

    Category - Card API

    Note

    Integrator may check the state of the card by calling D1Task.cardDigitizationState(_:completion:).

    Declaration

    Swift

    case cardNoPendingIDV = 40003
  • The required component is not configured.

    Note

    Integrator should check the underlying errors for more details. Ensure the required component has been configured.

    Declaration

    Swift

    case notInitialized = 60001
  • Invalid argument is passed to a method.

    Note

    Integrator should check the underlying errors for more details. Ensure the parameters are passed in the correct format.

    Declaration

    Swift

    case invalidArgument = 60002
  • Authn operations failed.

    Category - Authn API

    Note

    Integrator should check the underlying errors for more details.

    Declaration

    Swift

    case authn = 70001
  • Authn User is not enrolled.

    Declaration

    Swift

    case authnNotEnrolled = 70002
  • Authn Access denied

    Declaration

    Swift

    case authnAccessDenied = 70003
  • Authn Server response has no pending specified event.

    Declaration

    Swift

    case authnNoPendingEvents = 70004