# Error

# Error

This module includes error definitions used in OpenThread.

## Summary

| ### Enumerations ||
|---|---|
| `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49{ https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aa9ef65960404a1f6fdeed9be3ef885da = 0, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aef577f3803f81443a3c9a99c0e1b0fcd = 1, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a1fab335288c86ea6268eddebe3107b17 = 2, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a0fe6e3ff4e54e06df27218ea01ccafca = 3, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aef150de6ca07dd0e1cb617b42fc251ed = 4, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a6a6fb691b3fdb7d73a9686da4b47ec7e = 5, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49afc4b8e7ee86fbe428effec0c66497840 = 6, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a5993e545ac58858fff0db79d273eaec7 = 7, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a75cccf30f567cc64f78651e9f8ba324a = 8, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a1d5794d0098344e06e40b86710f968f2 = 9, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ae9d8df4f64b1f10fc7f7089de65ce0eb = 10, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a410aa4054e4d3c3b669f544dd6696f08 = 11, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aade792b218a43de2307b9083de7362ce = 12, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a06a12c56fb5b5f142ea6e05ccee3255b = 13, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a60dd340a7dde2865274c27c19b58a301 = 14, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aa665ccb3a568404c2dae3cd898c02202 = 15, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a97cbbacade2958914429267129423eef = 16, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a3068acc35fa09c545e47b1ca9855a228 = 17, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ab4af9bbc1eea92877cbf358bb543150b = 18, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a2e85a7160f668a83ec369ee5c7ffd094 = 19, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a39e3a3446087c7f51bf9843c986c1960 = 20, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aed47f9bf9c31949681d4ec70c49d9852 = 21, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a60fe13a5e0c4bf8dbc289f1eac5df46e = 22, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ad4ef0b30555548fccb4bd5c52be020b6 = 23, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a5edeb295e186724c65b590b426702160 = 24, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ab8db3fce896730ec088f92cb6dd1676c = 26, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aed75ee0379fd7576b9402e04cca79399 = 27, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a65a844762693da63dce775927c0c0f44 = 28, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a9cdd2082576ef9579ff7bcd7091cafc7 = 29, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49af52c005c326a2cc672447af4ddd9def7 = 30, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a1da8747d03a8979fe081e3744782db74 = 31, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ab167c0ed4ddf872fd823b31cfd5cce15 = 32, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ae4248d3f4c69b98ef1c15d46467b76d1 = 34, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a404d14ea7b4f18628fb544f189cf26db = 35, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49aeddd0dcfe88b101fe9489eee84b15dce = 36, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a02e68d649d76c0656c3e35a521f71376 = 37, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49ad8a62c74ae4757630e9ca89e94fd069c, https://openthread.io/reference/group/api-error#group__api-error_1ggabaaa90aaa35da8f9d394a227a23a6a49a9160030f024934134e3458731033dadd = 255 }` | enumRepresents error codes used throughout OpenThread. |

| ### Typedefs ||
|---|---|
| `https://openthread.io/reference/group/api-error#group__api-error_1ga0098ad357e9bb488c9311044a860e1f2` | typedef `enum https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Represents error codes used throughout OpenThread. |

| ### Functions ||
|---|---|
| `https://openthread.io/reference/group/api-error#group__api-error_1ga5868e51ce40efadf67f80e97e921b306(https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49 aError)` | `const char *` Converts an otError enum into a string. |

## Enumerations

### otError

```
 otError
```
Represents error codes used throughout OpenThread.

| Properties ||
|---|---|
| `OT_ERROR_ABORT` | Operation was aborted. |
| `OT_ERROR_ADDRESS_FILTERED` | Received a frame filtered by the address filter (allowlisted or denylisted). |
| `OT_ERROR_ADDRESS_QUERY` | Address resolution requires an address query operation. |
| `OT_ERROR_ALREADY` | The operation is already in progress. |
| `OT_ERROR_BUSY` | Service is busy and could not service the operation. |
| `OT_ERROR_CHANNEL_ACCESS_FAILURE` | A transmission could not take place due to activity on the channel, i.e., the CSMA-CA mechanism has failed (IEEE 802.15.4-2006). |
| `OT_ERROR_DESTINATION_ADDRESS_FILTERED` | Received a frame filtered by the destination address check. |
| `OT_ERROR_DETACHED` | Not currently attached to a Thread Partition. |
| `OT_ERROR_DROP` | Message was dropped. |
| `OT_ERROR_DUPLICATED` | Received a duplicated frame. |
| `OT_ERROR_FAILED` | Operational failed. |
| `OT_ERROR_FCS` | FCS check failure while receiving. |
| `OT_ERROR_GENERIC` | Generic error (should not use). |
| `OT_ERROR_INVALID_ARGS` | Input arguments are invalid. |
| `OT_ERROR_INVALID_COMMAND` | Input (CLI) command is invalid. |
| `OT_ERROR_INVALID_SOURCE_ADDRESS` | Received a frame from an invalid source address. |
| `OT_ERROR_INVALID_STATE` | Cannot complete due to invalid state. |
| `OT_ERROR_IP6_ADDRESS_CREATION_FAILURE` | The creation of IPv6 address failed. |
| `OT_ERROR_LINK_MARGIN_LOW` | The link margin was too low. |
| `OT_ERROR_NONE` | No error. |
| `OT_ERROR_NOT_CAPABLE` | Operation prevented by mode flags. |
| `OT_ERROR_NOT_FOUND` | The requested item could not be found. |
| `OT_ERROR_NOT_IMPLEMENTED` | Function or method is not implemented. |
| `OT_ERROR_NOT_LOWPAN_DATA_FRAME` | Received a non-lowpan data frame. |
| `OT_ERROR_NOT_TMF` | Message is not a TMF Message. |
| `OT_ERROR_NO_ACK` | No acknowledgment was received after macMaxFrameRetries (IEEE 802.15.4-2006). |
| `OT_ERROR_NO_ADDRESS` | Address is not in the source match table. |
| `OT_ERROR_NO_BUFS` | Insufficient buffers. |
| `OT_ERROR_NO_FRAME_RECEIVED` | No frame received. |
| `OT_ERROR_NO_ROUTE` | No route available. |
| `OT_ERROR_PARSE` | Failed to parse message. |
| `OT_ERROR_PENDING` | Special error code used to indicate success/error status is pending and not yet known. |
| `OT_ERROR_REASSEMBLY_TIMEOUT` | Message is being dropped from reassembly list due to timeout. |
| `OT_ERROR_REJECTED` | Request rejected. |
| `OT_ERROR_RESPONSE_TIMEOUT` | Coap response or acknowledgment or DNS, SNTP response not received. |
| `OT_ERROR_SECURITY` | Security checks failed. |
| `OT_ERROR_UNKNOWN_NEIGHBOR` | Received a frame from an unknown neighbor. |
| `OT_NUM_ERRORS` | The number of defined errors. |

## Typedefs

### otError

```
enum otError otError
```
Represents error codes used throughout OpenThread.

## Functions

### otThreadErrorToString

```
const char * otThreadErrorToString(
  otError aError
)
```
Converts an otError enum into a string.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `[in] aError` | An otError enum. | |
| **Returns** | A string representation of an otError. |

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).