Error handling
Overview
Most MobbScanAPI callbacks have an error, as the last argument, indicating why a process did not finish successfully.
The possible error comes in the form of a IMobbScanError
object where:
errorCode
: the specific error code.errorDetails
: extra information about the error.
Start scan errors
The following table shows the possible error codes and details:
Code | Details |
---|---|
CONNECTION_ERROR | A network connection error happened |
SCAN_PROCESS_ALREADY_STARTED_ERROR | The scan process identifier (scanId) is already used |
UNAUTHORIZED_ERROR | Request lacks valid authentication credentials for this method |
UNEXPECTED_ERROR | Something unexpected happened during the process |
WRONG_PARAMETERS_ERROR | Some of the parameters are not valid |
Scan document errors
The following table shows the possible error codes and details:
Code | Details |
---|---|
DOCUMENT_NOT_CLASSIFIED | The system is not able to classify the document |
FACE_DOCUMENT_NOT_DETECTED_ERROR | The system is not able to detect a face on the document |
UNEXPECTED_ERROR | Something unexpected happened during the process |
SCANNING_PROCESS_CANCELLED | The user has cancelled the process |
Validate face errors
The following table shows the possible error codes and details:
Code | Details |
---|---|
VIDEO_LIVENESS_SCANID_CREATION_ERROR | No valid face found in input video |
UNEXPECTED_ERROR | Something unexpected happened during the process |
USER_CANCELLED_ERROR | The user has cancelled the process |