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

# Catálogo de errores

> Lista de códigos de error con su respectiva descripción que puede devolver la API de BBrands.

## Formato

La API de BBrands responderá con errores que siguen una estructura definida para Cuentas, Licencias, Productos,
Suscripciones y otros recursos. Los mensajes de error tendrán el siguiente formato:

<CodeGroup>
  ```javascript Request theme={null}
  {
    "error":{
      "code": "BBXYYYZZZ",
      "errors": ["<string>"],
      "message": "Some descriptive message"
    },
    "meta": {
      "correlation": "<string>",
      "status": "<number>",
      "timestamp": "<string>"
    }
  }
  ```
</CodeGroup>

El propósito de esta sección es entender la estructura del campo code dentro de la respuesta de la API, proporcionando
un catálogo que lista los posibles códigos que la API puede devolver junto con sus descripciones correspondientes.

## Estructura del código de error

Los errores tendrán la siguiente sintaxis

<Frame>
  <img src="https://mintcdn.com/bbrands/SChHqGy4T8DLbxhI/images/structure-of-errors.png?fit=max&auto=format&n=SChHqGy4T8DLbxhI&q=85&s=e7f33883cb2fa349fd36b9a55c8f47d1" style={{ borderRadius: '0.5rem' }} width="1350" height="563" data-path="images/structure-of-errors.png" />
</Frame>

Con las siguientes fuentes

<Tabs>
  <Tab title="Types">
    <ParamField path="0" type="Not Explicit Type" />

    <ParamField path="1" type="Expected" />

    <ParamField path="2" type="Database" />

    <ParamField path="3" type="Validation" />

    <ParamField path="4" type="Rules" />
  </Tab>

  <Tab title="Entities">
    <ParamField path="000" type="Not Explicit Entity" />

    <ParamField path="001" type="Authenticate" />

    <ParamField path="002" type="General" />

    <ParamField path="003" type="Geolocation" />

    <ParamField path="004" type="Permission" />

    <ParamField path="005" type="Account" />

    <ParamField path="006" type="User" />

    <ParamField path="007" type="License" />

    <ParamField path="008" type="Product" />

    <ParamField path="009" type="Subscription" />

    <ParamField path="010" type="Payment" />

    <ParamField path="011" type="Queue" />

    <ParamField path="012" type="Integration" />

    <ParamField path="013" type="Maihue" />

    <ParamField path="014" type="Maihue Go" />

    <ParamField path="015" type="Zafety" />
  </Tab>

  <Tab title="Codes">
    <b>Not Explicit Entity</b>

    <ParamField path="BBX000001" type="Description" />

    <br />

    <b>Authenticate</b>

    <ParamField path="BBX001001" type="Description" />

    <br />

    <b>General</b>

    <ParamField path="BBX002001" type="Description" />

    <br />

    <b>Geolocation</b>

    <ParamField path="BBX003001" type="Description" />

    <br />

    <b>Permission</b>

    <ParamField path="BB3004001" type="Unauthorized">
      El usuario no tiene permiso para acceder al recurso.
    </ParamField>

    <ParamField path="BB3004002" type="Forbidden">
      El usuario no tiene permiso para realizar la acción.
    </ParamField>

    <ParamField path="BB3004003" type="Not Found">
      No se encontró el recurso.
    </ParamField>

    <ParamField path="BB3004004" type="Method Not Allowed">
      El método no está permitido para el recurso.
    </ParamField>

    <ParamField path="BB3004005" type="Not Acceptable">
      La solicitud no es aceptable.
    </ParamField>

    <ParamField path="BB3004006" type="Conflict">
      La solicitud entra en conflicto con el estado actual del recurso.
    </ParamField>

    <ParamField path="BB3004007" type="Too Many Requests">
      El usuario ha enviado demasiadas solicitudes en un período de tiempo determinado.
    </ParamField>

    <ParamField path="BB3004008" type="Internal Server Error">
      El servidor encontró una condición inesperada que le impidió atender la solicitud.
    </ParamField>

    <ParamField path="BB3004009" type="Bad Gateway">
      El servidor recibió una respuesta inválida de un servidor upstream.
    </ParamField>

    <ParamField path="BB3004010" type="Service Unavailable">
      El servidor actualmente no puede atender la solicitud debido a una sobrecarga temporal o mantenimiento del servidor.
    </ParamField>

    <ParamField path="BB3004011" type="Gateway Timeout">
      El servidor no recibió una respuesta oportuna de un servidor upstream.
    </ParamField>

    <br />

    <b>Account</b>

    <ParamField path="BBX005001" type="Description" />

    <br />

    <b>User</b>

    <ParamField path="BBX006001" type="Description" />

    <br />

    <b>License</b>

    <ParamField path="BBX007001" type="Description" />

    <br />

    <b>Product</b>

    <ParamField path="BBX008001" type="Description" />

    <br />

    <b>Subscription</b>

    <ParamField path="BBX009001" type="Description" />

    <br />

    <b>Payment</b>

    <ParamField path="BBX010001" type="Description" />

    <br />

    <b>Queue</b>

    <ParamField path="BBX011001" type="Description" />

    <br />

    <b>Integration</b>

    <ParamField path="BBX012001" type="Description" />

    <br />

    <b>Maihue</b>

    <ParamField path="BBX013001" type="Description" />

    <br />

    <b>Maihue Go</b>

    <ParamField path="BBX014001" type="Description" />

    <br />

    <b>Zafety</b>

    <ParamField path="BBX015001" type="Description" />
  </Tab>
</Tabs>
