> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos/errortimeout.md).

# errorTimeout

## Details

Emitted when exceeding [errorTimer](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/propiedades/errortimer.md) after a previous error prior to extraction.

**Event:** `errorTimeout`

**Type:** `FacephiSelphidWidgetCustomEvent<ErrorTimeoutEvent>` | `CustomEvent<ErrorTimeoutEvent>`

### Syntax

```typescript
selphid.addEventListener('errorTimeout', onErrorTimeout);
```

### Received object

The payload is of type `SelphidErrorTimeoutDetail` and is in `event.detail.detail`:

* `eventType` (`string`): Type of emitted event.
* `exceptionType` (`string`): Type of exception that caused the Timeout.
* `message` (`string`): Brief description of the error.
* `advancedTracking` (`Uint8Array`): Encoded advanced Tracking (optional).

**Values `exceptionType`**:

| Value                        | 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

Marks the end of the waiting period after a terminal exception. The Widget closes and you can implement the recovery logic.

### Considerations

The payload is in `event.detail.detail` (see [event format](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/eventos.md#formato-de-los-eventos)). The SPD codes match the table of [results](/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/resultados.md#codigos-de-error).

***

## Example

```jsx
<facephi-selphid-widget
    onErrorTimeout={(event) => {
      const { exceptionType, message } = event.detail.detail;
      console.error('Error timeout:', exceptionType, message);
    }}
/>
```

```typescript
import { type SelphidErrorTimeoutDetail } from '@facephi/sdk-web-wc';

selphid.addEventListener('errorTimeout', (event) => {
  const detail: SelphidErrorTimeoutDetail = event.detail.detail;
});
```
