> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Lista de erros do Reporter

> O Reporter retorna respostas de erro consistentes e estruturadas. Isso ajuda você a entender rapidamente o que deu errado e como corrigir.

**Formato do erro**

<CodeGroup>
  ```jsonon JSON theme={null}
  {
     "code": "<error_code>",
     "title": "<error_title>",
     "message": "<error_message>"
  }
  ```
</CodeGroup>

**Definição dos campos**

* **`code`** – Um identificador único e estável para o erro. Útil para tratamento programático e solicitações de suporte.
* **`title`** – Um resumo curto e legível do problema.
* **`message`** – Orientação detalhada para ajudá-lo a resolver o erro.

Essa estrutura garante que você sempre receba feedback acionável quando algo não sair como esperado.

## Erros do Reporter

***

Os seguintes erros podem ocorrer ao interagir com os endpoints do Reporter. Cada erro segue nossa estrutura padrão, facilitando a depuração e a resposta a problemas de forma programática.

Consulte a tabela abaixo para uma lista de possíveis códigos de erro, o que eles significam e como resolvê-los.

## 400

***

| `code`   | `title`                                    | `message`                                                                                                                                                                 |
| -------- | ------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| TPL-0001 | Missing required fields                    | One or more required fields are missing. Please ensure all required fields like 'description', 'template', and 'outputFormat' are included.                               |
| TPL-0002 | Invalid file format                        | The uploaded file must be a '.tpl' file. Other formats are not supported.                                                                                                 |
| TPL-0003 | Invalid output format                      | The outputFormat field must be one of: 'html', 'csv', or 'xml'.                                                                                                           |
| TPL-0004 | Invalid header                             | One or more header values are missing or incorrectly formatted. Please verify required headers %VALUE.                                                                    |
| TPL-0005 | Invalid File Uploaded                      | The file you submitted is invalid. Please check the uploaded file with error: %VALUE                                                                                      |
| TPL-0006 | Error File Empty                           | The file you submitted is empty. Please check the uploaded file                                                                                                           |
| TPL-0007 | Error File Content Invalid                 | The file content is invalid because is not %s. Please check the uploaded file.                                                                                            |
| TPL-0008 | Invalid Map Fields                         | The field on template file is invalid. Invalid field %s on %s.                                                                                                            |
| TPL-0009 | Invalid Path Parameter                     | Path parameters is in an incorrect format. Please check the following parameter %v and ensure they meet the required format before trying again.                          |
| TPL-0010 | Update Output format without template File | Can not update output format without passing template file. Please check information passed and try again.                                                                |
| TPL-0012 | Invalid templateID                         | The specified templateID is not a valid UUID. Please check the value passed.                                                                                              |
| TPL-0013 | Invalid ledgerID                           | The specified ledgerID inside ledger ID list is not a valid UUID. Please check the value passed %v.                                                                       |
| TPL-0014 | Missing required fields                    | The fields mapped on template file is missing on tables schema. Please check the fields passed '%v'.                                                                      |
| TPL-0015 | Unexpected Fields in the Request           | The request body contains more fields than expected. Please send only the allowed fields as per the documentation. The unexpected fields are listed in the fields object. |
| TPL-0016 | Missing Fields in Request                  | Your request is missing one or more required fields. Please refer to the documentation to ensure all necessary fields are included in your request.                       |
| TPL-0017 | Bad Request                                | The server could not understand the request due to malformed syntax. Please check the listed fields and try again.                                                        |
| TPL-0019 | Invalid Query Parameter                    | One or more query parameters are in an incorrect format. Please check the following parameters '%v' and ensure they meet the required format before trying again.         |
| TPL-0023 | Invalid Date Range Error                   | Both 'initialDate' and 'finalDate' fields are required and must be in the 'yyyy-mm-dd' format. Please provide valid dates and try again                                   |
| TPL-0026 | Metadata Key Length Exceeded               | The metadata value %v exceeds the maximum allowed length of %v characters. Please use a shorter value.                                                                    |
| TPL-0027 | Metadata Value Length Exceeded             | The metadata value %v exceeds the maximum allowed length of %v characters. Please use a shorter value.                                                                    |
| TPL-0028 | Invalid Metadata Nesting                   | The metadata object cannot contain nested values. Please ensure that the value %v is not nested and try again.                                                            |
| TPL-0029 | Report status not Finished                 | The Report is not ready to download. Report is processing yet.                                                                                                            |
| TPL-0030 | Missing Schema Table                       | There is a schema table missing. Please check your template file passed.                                                                                                  |
| TPL-0031 | Missing Data Source Table                  | The data source %v is missing. Please check the value passed.                                                                                                             |
| TPL-0032 | Script Tag Detected                        | The template file contains a script tag and is not allowed. Please check the template file and try again.                                                                 |

### 404

| `code`   | `title`                        | `message`                                                                                                                       |
| -------- | ------------------------------ | :------------------------------------------------------------------------------------------------------------------------------ |
| TPL-0011 | Entity Not Found               | No %v entity was found for the given ID. Please make sure to use the correct ID for the entity you are trying to manage.        |
| TPL-0020 | Invalid Date Format Error      | The 'initialDate', 'finalDate', or both are in the incorrect format. Please use the 'yyyy-mm-dd' format and try again.          |
| TPL-0021 | Invalid Final Date Error       | The 'finalDate' cannot be earlier than the 'initialDate'. Please verify the dates and try again.                                |
| TPL-0022 | Date Range Exceeds Limit Error | The range between 'initialDate' and 'finalDate' exceeds the permitted limit of %v months. Please adjust the dates and try again |
| TPL-0024 | Pagination Limit Exceeded      | The pagination limit exceeds the maximum allowed of %v items per page. Please verify the limit and try again.                   |
| TPL-0025 | Invalid Sort Order             | The 'sort\_order' field must be 'asc' or 'desc'. Please provide a valid sort order and try again.                               |

### 500

| `code`   | `title`                            | `message`                                                                              |
| -------- | ---------------------------------- | :------------------------------------------------------------------------------------- |
| TPL-0018 | Internal Server Error              | The server encountered an unexpected error. Please try again later or contact support. |
| TPL-0033 | Encryption data error Tag Detected | Error to make the encryption of CRM data. Err: %v                                      |
| TPL-0034 | Communication Error with SeaweedFS | Error to communicate with SeaweedFS to download or upload file. Please try again.      |
