# Error codes

Most errors in Rainbow-API include an error code and a brief explanation.

The possible errors containing the `error codes`, `status code` and how to fix them are listed in the following. &#x20;

### Auth Errors

| ERROR CODE | ERROR MESSAGE                     | EXPLANATION                                                                                          |
| ---------- | --------------------------------- | ---------------------------------------------------------------------------------------------------- |
| 40100      | `Unauthorized`                    | The account does not have the access to kyc file. Please validate your information.                  |
| 40101      | `Unauthorized, invalid JWT token` | The JWT token is invalied. Please use the correct JWT                                                |
| 40102      | `Authorization header is empty`   | The Authorization header is empty. Please add it.                                                    |
| 40103      | `Authorization token is invalid`  | Your authorization token is invalid. Please use the correct JWT.                                     |
| 40104      | `Token is expired`                | Your JWT is expired. Please call refresh JWT to get a new JWT.                                       |
| 40105      | `KYC required`                    | Your personal information has not been validated. Please validate your information.                  |
| 40106      | `No permission to access`         | Your account does not have the permission to access the kyc files. Please validate your information. |
| 40107      | `Auth header is empty`            | Your auth header is empty. Please add the JWT.                                                       |
| 40108      | `Missing exp field`               | The expired time is missing. Please add it.                                                          |
| 40109      | `Exp must be float64 format`      | The expired time should be float64.                                                                  |
| 40110      | `Jwt payload content uncorrect`   | The payload content uncorrect. Please correct it.                                                    |

{% hint style="info" %}
**Note:** The character `*` means the error message is not stationary. It depends on the detailed error. Please refer the detailed error message.
{% endhint %}

### Validation Errors

<table><thead><tr><th width="244.68851346338153">ERROR CODE</th><th width="239.33333333333331">ERROR MESSAGE</th><th>EXPLANATION</th></tr></thead><tbody><tr><td>40000</td><td><code>Invalid request</code></td><td>Your request is invalid. Please check the parameters.</td></tr><tr><td>40001</td><td><code>Invalid app id</code></td><td>Your <code>appid</code> <em>is not valid. Please use the correct <code>app_id</code>.</em></td></tr><tr><td>40002</td><td><code>Invalid address</code></td><td>The input address is incorrect. Please check the address.</td></tr><tr><td>40003</td><td><code>Chain is not supported</code></td><td>The chain type is not supported. The chain type includes <code>conflux</code> and <code>conflux_test</code>.</td></tr><tr><td>40004</td><td><code>Contract type is not supported</code></td><td>The contract type does not be supported. The supported contract type includes <code>ERC721</code> and <code>ERC1155</code>.</td></tr><tr><td>40005</td><td><code>Invalid url</code></td><td>The url path is not true. Please check the url again.</td></tr><tr><td>40006</td><td><code>Invalid metadataId</code></td><td>The metadataID is not true. The length of the metadataid should be 64.</td></tr><tr><td>40007</td><td><code>Invalid mint amount, mint amount could not be 0</code></td><td>The mint amount is invalied. Please set the mint amount again.</td></tr><tr><td>40008</td><td><code>Invalid mint amount, mint amount could not more than 1 for erc 721 contract</code></td><td>The mint amount is invalied. Please set the mint amount again.</td></tr><tr><td>40009</td><td><code>Invalid token ID</code></td><td>The token id is invalied. Please check the token id again.</td></tr><tr><td>40010</td><td><code>Contract type and contract address not match</code></td><td>The contract type and contract address do not match. Please check the contract type again.</td></tr><tr><td>40011</td><td><code>Invalid page or limit</code></td><td>The page or limit are invalid. The parameters should be integer.</td></tr></tbody></table>

### Conflict Errors

<table><thead><tr><th>ERROR CODE</th><th width="293.3333333333333">ERROR MESSAGE</th><th>EXPLANATION</th></tr></thead><tbody><tr><td>40900</td><td><code>Conflict</code></td><td></td></tr><tr><td>40901</td><td><code>company already exists</code></td><td>The company has been validated by other accounts. Please use another one.</td></tr></tbody></table>

### Ratelimit Errors

<table><thead><tr><th>ERROR CODE</th><th width="293.3333333333333">ERROR MESSAGE</th><th>EXPLANATION</th></tr></thead><tbody><tr><td>42900</td><td><code>Too many requests</code></td><td>Too many requests are sent in the meantime. Please reduce the number of requests.</td></tr></tbody></table>

### Internal Server Errors

| ERROR CODE | ERROR MESSAGE              | EXPLANATION                                                        |
| ---------- | -------------------------- | ------------------------------------------------------------------ |
| 50000      | `Internal Server error`    | <p>There are errors in the </p><p>internal server.</p>             |
| 50001      | `database operation error` | The databse operation is not correct. Please check your operation. |
| 50002      | \*                         | The data does not been found in the database.                      |

### Business Errors

<table><thead><tr><th>ERROR CODE</th><th width="293.3333333333333">ERROR MESSAGE</th><th>EXPLANATION</th></tr></thead><tbody><tr><td>60000</td><td><code>Business error</code></td><td>The transactions have not been processed. Please wait.</td></tr><tr><td>60001</td><td><code>Mint limit exceeded</code></td><td>The number of minted NFTs exceed the limits. Please reduce the number of the minted NFTs.</td></tr><tr><td>60002</td><td><code>Deploy limit exceeded</code></td><td>The number of deployed contracts exceed the limits. Please reduce the number of the deployed contracts.</td></tr><tr><td>60003</td><td><code>Uploade file limit exceeded</code></td><td>The number of uploaded files exceed the limits. Please reduce the number of the uploaded files</td></tr><tr><td>60004</td><td><code>Contract has no sponsor</code></td><td>Your contract has no sponsor. Please set the sponsor first.</td></tr><tr><td>60005</td><td><code>Contract sponsor balance not enough</code></td><td>The sponsor balance is not enough. Please connect to the sponsor.</td></tr><tr><td>60006</td><td><code>Contract has no sponsor for application admin</code></td><td>The contract has not sponsors.</td></tr><tr><td>60007</td><td><code>Only admin can reset admin</code></td><td>Only the app admin can reset the contract admin.</td></tr><tr><td>60008</td><td><code>Contract is not belong to this application</code></td><td>Contract does not belong to the application.</td></tr><tr><td>60009</td><td><code>Contract not exist</code></td><td>The contract does not exist. Please use the correct one.</td></tr></tbody></table>


---

# 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.nftrainbow.xyz/about-the-apis/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.
