Error Handling

In addition to document capture, the Document Scan SDK performs complex image analysis and data extraction. While there are defined errors that may occur during capture, it is up to you to determine analysis & data thresholds within your application.

Capture Data and Analysis

Extracted data and capture analysis is populated on every DSResult. Your decisioning will likely differ depending on the document classification (license, passport, passport card, etc.) and the side of the document.

Overall capture confidence will always be present in DSResult.confidence. Detailed capture analysis is stored in DSResult.captureAnalysis.

For detailed information on DSResult and decisioning, see Parsing Responses.

Capture Error Codes

Note

As of version 5.1.0, scan errors no longer relate to image quality or capture confidence. These metrics can be inspected directly on DSResult, and general capture confidence can be inspected via DSResult.confidence.

Code

Meaning

0

The provided license key is expired

1

Camera permissions are not granted by the user

2

The camera capture session could not be started

3

The scan could not begin because the scan controller is not presented

4

The camera is not supported in the iOS Simulator