Skip to main content

Error handling

Interface​

Every method reports failures through its error callback with these properties:

PropertyTypeDescription
errorCausestringSpecific cause, when available. See Codes and causes.
errorCodestringCode that identifies the error.
errorDetailsstringAdditional information about the error.

A response includes an error code and details, and may also include a more specific cause:

{
"errorCause": "USER_NOT_FOUND",
"errorCode": "WRONG_PARAMETERS_ERROR",
"errorDetails": "Some of the parameters are not valid"
}

Codes and causes​

Each code lists the method that returns it and recommended handling. Specific causes are shown in a separate group.

CONNECTION_ERRORNetwork error. Ask the user to check the connection and retry.initSdk, faceVerification
SAMPLE_ERRORInvalid sample. Ask the user to retry with good lighting, alone in front of the camera.faceVerification
UNAUTHORIZED_ERRORThe token has expired. Request a new one from your backend.initSdk, faceVerification1 cause
  • APPLICATION_NOT_FOUNDThe application ID is not valid.
USER_CANCELLED_ERRORThe user cancelled. Return to the previous step.faceVerification
WRONG_PARAMETERS_ERRORInvalid parameters. Check the values passed to the method.initSdk, faceVerification1 cause
  • USER_NOT_FOUNDThe user is not enrolled. Enrol the user before verifying them.