---
id: sdk.widgeterrorcode
title: WidgetErrorCode
hide_title: true
sidebar_class_name: sidebar-hidden
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@friendlycaptcha/sdk](./sdk.md) &gt; [WidgetErrorCode](./sdk.widgeterrorcode.md)

## WidgetErrorCode type

Error codes that can be returned by the widget.

\* `"network_error"`<!-- -->: The user's browser could not connect to the Friendly Captcha API. \* `"sitekey_invalid"`<!-- -->: The sitekey is invalid. \* `"sitekey_missing"`<!-- -->: The sitekey is missing. \* `"other"`<!-- -->: Some other error occurred.

In all cases it's the best practice to enable the "submit" button when the widget errors, so that the user can still perform the action despite not having solved the captcha.

**Signature:**

```typescript
export type WidgetErrorCode = "network_error" | "sitekey_invalid" | "sitekey_missing" | "other";
```