# Error Details Object

| Parameter    | Data Type | Field Validations                         | Description                                                                                                                                                                                                                       |
| ------------ | --------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ErrorCode    | String    | Enum: 5002, 4040, 6002, 6003, 8001.       | <p>Mandatory. A code to identify the error.</p><p></p><p>5002 - User not found </p><p>4040 - Unhandled Exception </p><p>6002 - User Input Exception </p><p>6003 - Resource Not Found </p><p>8001 - Zatca Validation Exception</p> |
| ErrorMessage | String    | Cannot be empty.                          | Mandatory. Human readable error message.                                                                                                                                                                                          |
| ErrorSource  | String    | <p>Enum: </p><p>ZATCA,</p><p>CLEARTAX</p> | <p>Mandatory. Source of the error.</p><p></p><p>ZATCA - Error message is from ZATCA.</p><p>CLEARTAX - Error message is from ClearTax.</p>                                                                                         |
| Path         | String    | NA                                        | Optional. If it is a validation error of a request data, it will point to the request data field.                                                                                                                                 |

### 401 Unauthorized

```json
{
    "ErrorCode":"100401",
    "ErrorMessage":"Authentication Failed",
    "ErrorSource":"CLEARTAX"
}
```

### 403 Forbidden

```json
{
    "ErrorCode":"100403",
    "ErrorMessage":"Authorization Failed",
    "ErrorSource":"CLEARTAX"
}
```
