Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›How to use

MobbScan Capacitor

  • Getting started

How to use

  • Initialization
  • Onboarding process
  • Error handling
  • Validation criteria

Help

  • Changelog

Error handling

Overview

As you might have read along these documents, most of the MobbScanAPI callbacks have an error as their last argument. This is the way MobbScan let you know the reason why a process did not end successfully.

The possible error comes with the general structure as follows:

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

where:

  • errorCode: is a string and represents the specific code identifying the error.
  • errorDetails: is a string and provides additional information or context about the error.

Error Codes

The following table shows the possible error codes and their meaning:

CodeMeaningMethod
CONNECTION_ERRORA network connection error happened.startScan
DOCUMENT_NOT_CLASSIFIEDThe system is not able to classify the document (see below).scanDocument
ERROR_WRONG_DOCUMENT_TYPEThe document selected for scanning does not match the document used by the user.scanDocument
FACE_DOCUMENT_NOT_DETECTED_ERRORThe system is not able to detect a face on the document.scanDocument
SCAN_PROCESS_ALREADY_STARTED_ERRORThe scan process identifier (scanId) is already used.startScan
UNAUTHORIZED_ERRORWrong scanId, previously used or expired token.startScan, scanDocument, validateFace
USER_CANCELLED_ERRORBack button pressed during the scanning process.scanDocument, validateFace
VALIDATION_ERRORThe validation criteria were not met (see below).scanDocument, validateFace
WRONG_PARAMETERS_ERRORWrong token or no scanId provided.startScan

Document Not Classified Error

This type of error may occur when the system is unable to classify the document used by the user in the scanDocument method. In this case, the error will also include a more specific reason that can be used to provide additional information to the user, as shown in the example below.

{
    "errorCode": "DOCUMENT_NOT_CLASSIFIED",
    "errorDetails": "The system is not able to classify the document",
    "errorReason": "NOT_VALID_DOCUMENT"
}

where:

  • errorReason: is a string and represents the specific reason identifying the error.

The following table shows the possible error reasons and their meaning:

CodeMeaning
ERROR_BACK_DOCUMENT_SIDE_DUPLICATEDThe two images from the scanning process are of the back side of a document.
ERROR_FRONT_DOCUMENT_SIDE_DUPLICATEDThe two images from the scanning process are of the front side of a document.
ERROR_DOCUMENT_SIDE_TYPE_MISMATCHThe images of the front and back sides of the document are from different types of documents.
NOT_VALID_DOCUMENTThe document has been classified but does not belong to the specified document type (for example, a German document with documentType ESP).

Validation Error

This type of error may occur when one or more validations fail in the scanDocument or validateFace methods. In this case, the error will also include the details of the failed validations, as shown in the examples below, as well as an optional specific reason in the case of the validateFace method.

scanDocument
validateFace
{
"errorCode": "VALIDATION_ERROR",
"errorDetails": "Some of the validation criteria have failed.",
"failedValidations": ["validationDocumentNotExpired", "validationDocumentNotSpecimen"]
}

where:

  • failedValidations: is an array of strings listing the validation criteria that have not been met.
{
"errorCode": "VALIDATION_ERROR",
"errorDetails": "Some of the validation criteria have failed.",
"errorReason": "FACE_NOT_FOUND",
"failedValidations": ["validationLiveness", "validationIdentityVerification"]
}

where:

  • errorReason: is a string and represents the specific reason identifying the error.
  • failedValidations: is an array of strings listing the validation criteria that have not been met.

The following table shows the possible error reasons and their meaning:

CodeMeaning
BAD_FACE_POSITIONThe face is not positioned correctly for verification.
BAD_LIGHTINGLighting conditions do not allow for proper verification.
FACE_NOT_FOUNDNo valid face was detected for verification.
FACE_SERVICE_ERRORAn error occurred while communicating with the verification service.
MULTIPLE_FACES_DETECTEDMultiple faces were detected, and verification cannot be performed.
VALIDATION_MATRIX_NOT_PASSEDSome of the validation criteria have failed.
← Onboarding processValidation criteria →
  • Overview
  • Error Codes
    • Document Not Classified Error
    • Validation Error
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2026 Mobbeel Solutions SL