For the complete documentation index, see llms.txt. This page is also available as Markdown.

exceptionCaptured

An exception occurred during execution.

Details

It is emitted for errors or unexpected situations during capture.

Event: exceptionCaptured

Type: FacephiSelphidWidgetCustomEvent<ExceptionCapturedEvent> | CustomEvent<ExceptionCapturedEvent>

Syntax

selphid.addEventListener('exceptionCaptured', onExceptionCaptured);

Received object

The payload is of type SelphidExceptionCapturedDetail and is in event.detail.detail:

  • eventType (string): Type of emitted event.

  • exceptionType (string): Exception type (ExceptionType).

  • message (string): Brief description of the error.

  • code (string): Error code associated with exceptionType.

Values exceptionType — terminals:

Value
Description

AndroidWebViewBehaviour

The widget cannot run in Android WebView.

BrowserApiNotCompatible

The browser is not compatible.

CameraHardwareError

Error accessing the camera.

PermissionsDenied

Required permissions not granted.

CameraPermissionDenied

Camera permission denied.

MicrophonePermissionDenied

Microphone permission denied.

SettingsError

Misformatted configuration property.

UnknownInternalError

Unknown internal error.

ExternalCameraChangeTimeout

Timeout when switching external camera.

Values exceptionType — extraction:

Value
Description

ErrorTimeout

The extraction timeout has been exceeded.

Values code:

exceptionType

Code

AndroidWebViewBehaviour

SPD_318

UnknownInternalError

SPD_329

CameraHardwareError

SPD_305

PermissionsDenied

SPD_332

CameraPermissionDenied

SPD_301

MicrophonePermissionDenied

SPD_319

SettingsError

SPD_320

BrowserApiNotCompatible

SPD_321

ErrorTimeout

SPD_001

Description

Allows filtering and reacting to the different types of error during document capture.

Considerations

The payload is in event.detail.detail (see event format). Terminal exceptions show an error view and close the widget after errorTimer.

SPD codes are aligned with the table of results. For ExternalCameraChangeTimeout, see the value emitted in code.


Example

Last updated