# 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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleartax.in/cleartax-docs/e-invoicing-ksa-api/e-invoicing-ksa-api-reference/resources-and-masters/error-details-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
