# Error Codes

{% hint style="info" %}
These should not be added to API libraries and it's for developers to help debug their code for issues.
{% endhint %}

These will be cleaned up at a later date!

<details>

<summary><code>[G]</code> General Errors </summary>

`RL-1:` **Ratelimit exceeded**\
You have hit the request limit for your API token, please do not spam requests and try again later.<br>

`G-1:` **Authorization header is missing**\
You need to use the API with an API key and Authorization header.\
Find your API token or purchase access on our website <https://fluxpoint.dev/api> you will need to login with your Discord account.<br>

`G-2:` **Auth token is invalid**\
Your API token is not correct please make sure that it starts with FP- and that you got it from <https://fluxpoint.dev/api><br>

`G-3:` **Token disabled**\
Your access to the API has been blocked, you will need to contact us on our Discord server <https://discord.gg/fluxpoint> for more info and to get unblocked.<br>

`G-4:` **This endpoint is restricted and can't be used** \
This feature/endpoint can only be used by the developer.<br>

`G-5:` **You need to use the correct API host**\
You need to use the gallery API (gallery.fluxpoint.dev/api/) to request images and not the main API.<br>

`G-6:` **You need to use https\:// requests, cloudflare redirect strips request body** \
Your request has been automatically redirected from http to https, you need to use the API with https\:// requests otherwise some endpoint won't work.<br>

`G-7:` **This endpoint does not exists**\
You need to use the correct API endpoints, some may require you to use the main or gallery API.\
<https://docs.fluxpoint.dev/api/endpoints/test><br>

`G-8:` Bri'ish people like this http status code ;) have fun finding it\
Very funny status code, you will get an achievement for finding this by checking the API /me endpoint.

</details>

<details>

<summary><code>[I]</code> Internal Errors</summary>

If you have any major issues with the API please contact us on our Discord\
<https://discord.gg/fluxpoint><br>

`I-1:` **Major API error occured** \
Your request failed because the API has some issues or failed to complete your request which will need fixing by the API developer. \
Report this on our Discord server.<br>

`I-2:` **Minecraft server query broken failed to parse query response** \
The API failed to make a minecraft server request due to API issues, make sure you use the correct IP/domain or report this on our Discord server. <br>

`I-3:` **Color info failed to get RGB info** \
The API could not get color information for the color name/value you provided, make sure to use the right query parameter of name/hex/rgb and format.<br>

`I-4:` **Failed to generate image**\
Image generation has failed due to an issue with the API or the specific format of your json body. \
Report this issue on our Discord server.

</details>

<details>

<summary><code>[MC]</code> Minecraft Errors</summary>

`MC-1:` Host query is missing \
`MC-2:` Host query is invalid\
`MC-3:` Localhost is not allowed :p\
`MC-4:` Port query is invalid \
`MC-5:` Port query is not allowed :p

</details>

<details>

<summary><code>[CV]</code> Convert Errors</summary>

`CV-1:` Request body does not have html content \
`CV-2:` Request body does not have markdown content \
`CV-3:` Max content length is 10,000 \
`CV-4:` Javascript html tag is blocked \
`CV-5:` Iframe html tag is blocked

</details>

<details>

<summary><code>[CI]</code> Color Info Errors</summary>

`CI-1:` You need to specify a color query of hex/rgb/name \
`CI-2:` Hex query is invalid \
`CI-3:` Failed to get hex color (Possible api error) \
`CI-4:` Failed to get color name (Possible api error) \
`CI-5:` RGB query format is invalid \
`CI-6:` RGB query is invalid and not valid numbers \
`CI-7:` RGB query is invalid and number are not 0-255

</details>

<details>

<summary><code>[IG]</code> Image Gen Errors</summary>

`IG-1:` Request body does not have json content \
`IG-2:` ( Invalid image format type ) \
`IG-3:` Image query is missing \
`IG-4:` Invalid image template name \
`IG-5:` Image template has been disabled due to issues \
`IG-6:` Image template is restricted and can't be used \
`IG-7:` Failed to parse request json make sure it has key/value pairs \
`IG-8:` Request json has invalid parameters

</details>

<details>

<summary><code>[CG]</code> Custom Image Gen Errors</summary>

`CG-1:` Request body does not have json content \
`CG-2:` Request body is not json or does not start and end with { } \
`CG-3:` ( Invalid image format type ) \
`CG-4:` Failed to parse request json make sure it has a valid format \
`CG-5:` Request json base format is missing or invalid. \
`CG-6:` Request json has invalid parameters

</details>

<details>

<summary><code>[CL]</code> Gallery Errors</summary>

`GL-1:` **Unknown album**\
**.**<br>

`GL-2:` **Unknown tag/category**\
T<br>

`GL-3:` **Restricted/private album**\
T<br>

`GL-4:` **Album has no images**\
T<br>

`GL-5:` **Tag/category has no images**\
T<br>

`GL-6:` **Invalid image category**\
T<br>

`GL-7:` **API error, invalid image endpoint**\
T<br>

`GL-8:` **API error invalid image type**\
T

</details>


---

# 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.fluxpoint.dev/api/client/error-codes.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.
