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

Results

Results provided by the Selphi Widget component.

On this page we will explain the different ways to finish the Widget capture process.

Each detail of each event (attributes, data, etc.) has been specified on the page (Events).

Success stories

Successful capture and extraction

At the moment the Biometric Template capture is completed, the extracted results will be provided in the event extractionFinish (link).

Once this event is emitted, the logic for loading the next view or Widget must be implemented according to the application's context.

There is an example:

import { type ExtractionFinishEvent } from "@facephi/selphi-web-component";

const selphiWidget = document.querySelector('facephi-selphi-widget');
selphiWidget.addEventListener('extractionFinish', onExtractionFinish);

function onExtractionFinish(event: CustomEvent<ExtractionFinishEvent>) {
  const result = event.detail.detail;
  console.log('extractionFinish:', result);

  // Process the results in the backend
  saveResults(result.extractionData.bestImage, result.extractionData.templateRaw);

  // Cargar el siguiente widget o vista
  loadNextView();
}

Error cases

It is recommended to handle possible errors that may occur when processing the obtained data to avoid internal malfunction, improper use of the Widget, or brute-force attacks.

Error codes

The Widget will throw an exception if any usage or internal error occurs.

Exceptions can be of two types:

  • Terminal exception: Error that will be thrown when the Widget cannot continue executing. These errors can occur in incorrect environments or configurations.

  • Extraction exception: Error that will be thrown during the capture or extraction flow. These errors allow retrying the Widget flow, as they are due to incorrect use of the Widget by the user.

Error
Code
Description

Terminal exceptions

AndroidWebViewBehaviour

SPI_227

Error produced after executing the component in a WebView in an Android environment.

UnknownInternalError

SPI_235

Internal error in the Widget. If the error persists, it will be necessary to contact the Facephi support team

CameraHardwareError

SPI_204

Error produced during access to the device's cameras.

PermissionsDenied

SPI_242

Error generated by not allowing the necessary permissions for the execution of the Widget.

CameraPermissionDenied

SPI_201

Error due to not granting permission to use the device's camera(s).

MicrophonePermissionDenied

SPI_218

Error due to not granting permission to use the device's microphone(s).

SettingsError

SPI_219

Error caused by incorrect configuration.

BrowserApiNotCompatible

SPI_220

Error produced by an unsupported browser.

SpoofingDetected

SPI_221

Error generated when an injection attack is detected in the Widget.

ActiveLivenessError

SPI_205

Error generated when active liveness check fails during Widget execution.

Extraction exceptions

ErrorTimeout

SPI_001

Error generated when the established time limit for extraction has been exceeded.

FaceNotFound

SPI_222

Error generated when no face is found during the capture process.

EyesNotFound

SPI_223

Error generated when the eyes are not detected during the capture process.

OccludedEyes

SPI_237

Error generated when covered eyes are detected during the capture process.

OccludedMouth

SPI_238

Error generated when a covered mouth is detected during the capture process.

DarkLightError

SPI_224

Error generated when low lighting is detected during the capture process.

AngleExceeded

SPI_225

Error generated when an excessive angle of the user's face is detected during the capture process.

TooManyFaces

SPI_226

Error generated when multiple faces are detected during the capture process.

NotStabilizedSunGlasses

SPI_223

Error generated when sunglasses are detected on the user during the capture process.

NotStabilizedNoColor

SPI_224

Error generated when no color is detected during the capture process.


Time limit exceeded during Biometric Template capture

With the events extractionTimeout (link) and timeoutErrorButtonClick (link) it is possible to control when the user exceeds the allotted time or the attempts used.

There is an example:


The user closes the Widget before document capture

This event is emitted when the user clicks the Widget's exit icon to cancel the extraction process. Once the button is pressed, the Widget will close.

Code example


Terminal exceptions during the Widget lifecycle

This event is emitted when a system malfunction is detected. It can be used to identify and filter different types of errors encountered during the capture process.

Code example:


Last updated