> ## 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.

# Catalog of errors

> List of error codes with their respective description that can be returned by the BBrands API.

## Format

The BBrands API will respond with errors that follow a defined structure for Accounts, Licenses, Products,
Subscriptions and others resources. The error messages will have the following format:

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

The purpose of this section is to understand the structure of the code field within the API response by providing
a catalog listing the possible codes that the API can return along with their corresponding descriptions.

## Structure of the error code

Errors will have the following syntax

<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>

With the following sources

<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">
      The user does not have permission to access the resource.
    </ParamField>

    <ParamField path="BB3004002" type="Forbidden">
      The user does not have permission to perform the action.
    </ParamField>

    <ParamField path="BB3004003" type="Not Found">
      The resource was not found.
    </ParamField>

    <ParamField path="BB3004004" type="Method Not Allowed">
      The method is not allowed for the resource.
    </ParamField>

    <ParamField path="BB3004005" type="Not Acceptable">
      The request is not acceptable.
    </ParamField>

    <ParamField path="BB3004006" type="Conflict">
      The request conflicts with the current state of the resource.
    </ParamField>

    <ParamField path="BB3004007" type="Too Many Requests">
      The user has sent too many requests in a given amount of time.
    </ParamField>

    <ParamField path="BB3004008" type="Internal Server Error">
      The server encountered an unexpected condition that prevented it from fulfilling the request.
    </ParamField>

    <ParamField path="BB3004009" type="Bad Gateway">
      The server received an invalid response from an upstream server.
    </ParamField>

    <ParamField path="BB3004010" type="Service Unavailable">
      The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
    </ParamField>

    <ParamField path="BB3004011" type="Gateway Timeout">
      The server did not receive a timely response from an upstream server.
    </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>
