> ## 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 errores de Reporter

> Reporter devuelve respuestas de error consistentes y estructuradas. Esto te ayuda a comprender rápidamente qué salió mal y cómo solucionarlo.

**Formato de error**

Reporter devuelve los errores como detalles de problema RFC 9457 con el tipo de medio `application/problem+json`:

<CodeGroup>
  ```json JSON theme={null}
  {
    "type": "https://errors.lerian.studio/v1/RPT-0012",
    "title": "Bad Request",
    "status": 400,
    "detail": "The specified templateID is not a valid UUID. Please check the value passed.",
    "code": "RPT-0012"
  }
  ```
</CodeGroup>

**Definiciones de campos**

* **`type`** – Una URI que identifica el error en el catálogo de errores de Lerian. Se construye como `https://errors.lerian.studio/v1/<code>`.
* **`title`** – El texto del estado HTTP (por ejemplo, `Bad Request`).
* **`status`** – El código de estado HTTP.
* **`detail`** – Orientación detallada para ayudarte a resolver el error. En las respuestas `5xx`, el detalle siempre se sanea a `internal error` para que ninguna causa interna se filtre; usa `code` para el manejo programático.
* **`code`** – Un identificador estable y único para el error (`RPT-NNNN`). Útil para el manejo programático y solicitudes de soporte.
* **`errors`** – Lista opcional de detalles de validación por campo, cada uno con un `message` y una `location`.

Algunos mensajes contienen marcadores como `%v` o `%s` — Reporter los reemplaza con los valores específicos de tu solicitud.

## Errores de Reporter

***

Los siguientes errores pueden ocurrir al interactuar con los endpoints de Reporter. Consulta las tablas a continuación para conocer los códigos de error posibles, qué significan y cómo resolverlos.

## 400 — Errores de validación

***

| `code`   | Descripción                                | `detail`                                                                                                                                                                  |
| -------- | ------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| RPT-0001 | Missing required fields                    | One or more required fields are missing. Please ensure all required fields are included.                                                                                  |
| RPT-0002 | Invalid file format                        | The uploaded file must be a .tpl file. Other formats are not supported.                                                                                                   |
| RPT-0003 | Invalid output format                      | The outputFormat field must be one of: html, csv, or xml.                                                                                                                 |
| RPT-0004 | Invalid header                             | One or more header values are missing or incorrectly formatted. Please verify required headers %v.                                                                        |
| RPT-0005 | Invalid File Uploaded                      | The file you submitted is invalid. Please check the uploaded file with error: %v                                                                                          |
| RPT-0006 | Error File Empty                           | The file you submitted is empty. Please check the uploaded file.                                                                                                          |
| RPT-0007 | Error File Content Invalid                 | The file content is invalid because is not %s. Please check the uploaded file.                                                                                            |
| RPT-0008 | Invalid Map Fields                         | The field on template file is invalid. Invalid field %s on %s.                                                                                                            |
| RPT-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.                          |
| RPT-0010 | Update Output format without template File | Can not update output format without passing template file. Please check information passed and try again.                                                                |
| RPT-0012 | Invalid templateID                         | The specified templateID is not a valid UUID. Please check the value passed.                                                                                              |
| RPT-0013 | Invalid ledgerID                           | The specified ledgerID inside ledger ID list is not a valid UUID. Please check the value passed %v.                                                                       |
| RPT-0014 | Missing required fields                    | The fields mapped on template file are missing in the table schema or may be empty. Please check the fields passed: '%v'.                                                 |
| RPT-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. |
| RPT-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.                       |
| RPT-0017 | Bad Request                                | The server could not understand the request due to malformed syntax. Please check the listed fields and try again.                                                        |
| RPT-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.         |
| RPT-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.                                  |
| RPT-0024 | Pagination Limit Exceeded                  | The pagination limit exceeds the maximum allowed of %v items per page. Please verify the limit and try again.                                                             |
| RPT-0025 | Invalid Sort Order                         | The 'sort\_order' field must be 'asc' or 'desc'. Please provide a valid sort order and try again.                                                                         |
| RPT-0026 | Metadata Key Length Exceeded               | The metadata key %v exceeds the maximum allowed length of %v characters. Please use a shorter key.                                                                        |
| RPT-0027 | Metadata Value Length Exceeded             | The metadata value %v exceeds the maximum allowed length of %v characters. Please use a shorter value.                                                                    |
| RPT-0028 | Invalid Metadata Nesting                   | The metadata object cannot contain nested values. Please ensure that the value %v is not nested and try again.                                                            |
| RPT-0030 | Missing Schema Table                       | The schema table %v is missing for data source '%v'. Please check the information passed.                                                                                 |
| RPT-0031 | Missing Data Source Table                  | The data source %v is missing. Please check the value passed.                                                                                                             |
| RPT-0032 | Script Tag Detected                        | The template file contains a script tag and is not allowed. Please check the template file and try again.                                                                 |
| RPT-0035 | Ambiguous Schema Reference                 | The table '%v' exists in multiple schemas: %v. Please use explicit schema syntax: database:schema.table                                                                   |
| RPT-0036 | Schema Not Found                           | The schema '%v' was not found in database '%v'. Please verify the schema name.                                                                                            |
| RPT-0037 | Table Not Found in Schema                  | The table '%v' was not found in schema '%v' of database '%v'. Please verify the table name and schema.                                                                    |
| RPT-0038 | Database Not Registered                    | The database '%v' is not registered. Please verify the datasource configuration.                                                                                          |
| RPT-0041 | Bucket Required                            | The storage bucket name is required. Please check the storage configuration.                                                                                              |
| RPT-0042 | Object Key Required                        | The object key is required for the storage operation.                                                                                                                     |
| RPT-0044 | TTL Not Supported                          | TTL parameter is not supported in S3 mode. Use bucket lifecycle policies instead.                                                                                         |
| RPT-0046 | Invalid Deadline Type                      | The 'type' field must be 'regulatory' or 'custom'. Please provide a valid deadline type and try again.                                                                    |
| RPT-0047 | Invalid Deadline Frequency                 | The 'frequency' field must be one of: 'once', 'daily', 'weekly', 'monthly', 'semiannual', 'annual'. Please provide a valid frequency and try again.                       |
| RPT-0048 | Invalid Deadline Color                     | The 'color' field must be a valid hex color code (e.g., '#FF5733'). Please provide a valid color and try again.                                                           |
| RPT-0050 | Months of Year Not Applicable              | The 'monthsOfYear' field is not applicable for frequency '%v'. It can only be used with 'semiannual' or 'annual' frequencies.                                             |
| RPT-0052 | Months of Year Required                    | The 'monthsOfYear' field is required for frequency '%v'. Please specify which months of the year the deadline should recur on.                                            |
| RPT-0054 | Months of Year Out of Range                | Each value in 'monthsOfYear' must be between 1 and 12. Received invalid value: %v.                                                                                        |
| RPT-0055 | Due Date in the Past                       | The 'dueDate' must be today or a future date. Please provide a date that is not in the past.                                                                              |
| RPT-0056 | Months of Year Count Mismatch              | The number of months in 'monthsOfYear' does not match the '%v' frequency. 'semiannual' requires exactly 2 months and 'annual' requires exactly 1 month.                   |
| RPT-0059 | Schema Validation Failed                   | The schema validation failed. Please verify the fields against the data source schema.                                                                                    |
| RPT-0062 | Invalid UTF-8 Encoding                     | The '%v' field contains invalid UTF-8 byte sequences. Please provide valid UTF-8 text and try again.                                                                      |

<Note>
  El mensaje de RPT-0003 lista `html`, `csv` y `xml`, pero la API acepta cinco formatos de salida: `HTML`, `PDF`, `CSV`, `XML` y `TXT`. Consulta [Cargar plantilla](/es/reference/reporter/upload-template).
</Note>

## 404 — No encontrado

***

| `code`   | Descripción                    | `detail`                                                                                                                         |
| -------- | ------------------------------ | :------------------------------------------------------------------------------------------------------------------------------- |
| RPT-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.         |
| RPT-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.           |
| RPT-0021 | Invalid Final Date Error       | The 'finalDate' cannot be earlier than the 'initialDate'. Please verify the dates and try again.                                 |
| RPT-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. |
| RPT-0043 | Object Not Found               | The requested object was not found in storage.                                                                                   |
| RPT-0057 | Data Source Not Found          | The requested data source was not found. Please verify the data source ID.                                                       |

## 409 — Conflictos

***

| `code`   | Descripción                 | `detail`                                                                                                                                  |
| -------- | --------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
| RPT-0039 | Duplicate Request In Flight | A duplicate request is currently being processed. Please wait and try again.                                                              |
| RPT-0040 | Idempotency Conflict        | A request with this idempotency key has already been processed.                                                                           |
| RPT-0045 | Duplicate Deadline          | A deadline with the same name, type, due date, and frequency already exists. Please use different values or update the existing deadline. |

## 422 — No procesable

***

| `code`   | Descripción                | `detail`                                                       |
| -------- | -------------------------- | :------------------------------------------------------------- |
| RPT-0029 | Report status not Finished | The Report is not ready to download. Report is processing yet. |

## 500 — Errores del servidor

***

| `code`   | Descripción           | `detail`       |
| -------- | --------------------- | :------------- |
| RPT-0018 | Internal Server Error | internal error |

<Note>
  Toda falla inesperada durante el procesamiento síncrono de un endpoint se presenta como HTTP 500 con `code: RPT-0018` y un `detail` saneado a `internal error` — las causas internas nunca se filtran en el cuerpo de la respuesta. Los fallos asíncronos del worker y de la generación de reportes siguen los estados y metadatos descritos a continuación; no se devuelven en la solicitud original como HTTP 500.
</Note>

## Errores de generación de reportes (asíncronos)

***

La generación de reportes se ejecuta de forma asíncrona en el worker. Una sección de extracción de datos que falla no se devuelve en la solicitud HTTP original: el reporte termina con estado `Error` cuando todas las secciones fallan o `Partial` cuando algunas fallan. En ambos casos, `metadata.error_code` es `RPT-0060`; `metadata.sections` se indexa por el nombre de la base de datos y cada entrada fallida contiene solo su `error_code` clasificado (`RPT-0018` para una falla sin tipo). Otros fallos del worker terminan con estado `Error` y un `metadata.error_code` seguro que no es RPT: `report_generation_failed`, `report_generation_timeout` o `report_generation_canceled`; no tienen un mapa `sections` ni conservan el código RPT subyacente.

| `code`   | Descripción                        | Significado                                                                                                              |
| -------- | ---------------------------------- | :----------------------------------------------------------------------------------------------------------------------- |
| RPT-0033 | Encryption data error              | Falló el descifrado de los datos de CRM durante la extracción.                                                           |
| RPT-0034 | Communication Error with SeaweedFS | Error al comunicarse con el almacenamiento de archivos para descargar o subir un archivo. Inténtalo de nuevo.            |
| RPT-0058 | Data Source Unavailable            | La fuente de datos no está disponible actualmente. Los resultados pueden estar incompletos.                              |
| RPT-0060 | Extraction Job Failed              | El trabajo de extracción falló. Inténtalo de nuevo más tarde o contacta a soporte.                                       |
| RPT-0061 | Template Rendering Failed          | La plantilla no pudo renderizarse con los datos proporcionados. Es un error permanente y no se resolverá con reintentos. |
| RPT-0063 | CRM Hash Key Not Configured        | La clave hash de CRM no está configurada.                                                                                |
| RPT-0064 | CRM Encrypt Key Not Configured     | La clave de cifrado de CRM no está configurada.                                                                          |
| RPT-0065 | Record Decryption Failed           | Falló el descifrado del registro.                                                                                        |
| RPT-0066 | Cipher Init Failed                 | Falló la inicialización del cifrador.                                                                                    |
| RPT-0067 | Invalid Extracted Data             | Los datos extraídos no son válidos.                                                                                      |
| RPT-0068 | Unexpected Collection Result       | La recolección de datos devolvió un resultado inesperado.                                                                |
| RPT-0069 | Data Source Not Found              | No se encontró la fuente de datos referenciada por el reporte.                                                           |
| RPT-0070 | Data Source Unavailable            | La fuente de datos no estuvo disponible durante la extracción.                                                           |
