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: FacephiSelphiWidgetCustomEvent<ExceptionCapturedEvent> | CustomEvent<ExceptionCapturedEvent>

Syntax

selphi.addEventListener('exceptionCaptured', onExceptionCaptured);

Received object

The payload is of type SelphiExceptionCapturedDetail 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): SPI 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.

SpoofingDetected

Spoofing attempt detected (antispoof).

ActiveLivenessError

The active liveness check has failed.

Values exceptionType — extraction:

Value
Description

ErrorTimeout

The extraction timeout has been exceeded.

FaceNotFound

No face found.

EyesNotFound

No eyes found.

AngleExceeded

The face is not straight.

DarkLightError

Insufficient light.

TooManyFaces

More than one face detected.

OccludedEyes

Occluded eyes.

OccludedMouth

Occluded mouth.

ExternalCameraChangeTimeout

Timeout when switching external camera.

Values code:

exceptionType

Code

AndroidWebViewBehaviour

SPI_227

UnknownInternalError

SPI_235

CameraHardwareError

SPI_204

PermissionsDenied

SPI_242

CameraPermissionDenied

SPI_201

MicrophonePermissionDenied

SPI_218

SettingsError

SPI_219

BrowserApiNotCompatible

SPI_220

SpoofingDetected

SPI_221

ActiveLivenessError

SPI_205

ErrorTimeout

SPI_001

FaceNotFound

SPI_222

EyesNotFound

SPI_223

OccludedEyes

SPI_237

OccludedMouth

SPI_238

DarkLightError

SPI_224

AngleExceeded

SPI_225

TooManyFaces

SPI_226

Description

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

Considerations

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

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


Example

Last updated