> For the complete documentation index, see [llms.txt](https://docs.native.org/native-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling.md).

# Error Handling

## Error Handling

Requests with application or business logic errors will return with an HTTP code of 200, but with additional fields for error code and message. For example:

```json
{
  "code": 171008,
  "message": "Internal Server Error"
}

{
  "code": 171018,
  "message": "expire time exceeds global limit 120s"
}
```

To verify the response status, please check `success` bool, or if `code` is present in the response.

{% hint style="info" %}
Please note that for endpoints that typically return an array, when they encounter an error, the response will be in object format.
{% endhint %}

## Error Codes

The list of most common error codes returned by CrossChain Swap APIs. For other unknown errors, please reach out to Native team members via an existing channel.

<table data-header-hidden><thead><tr><th width="96.18927001953125">Code</th><th width="229.49609375">Message</th><th>Reason</th><th>Mitigation</th></tr></thead><tbody><tr><td>351015</td><td>requested amount smaller than token out minimum wei [xxx]</td><td>The buying (bridge to) token amount is too small.</td><td>Check <a data-mention href="/pages/UTe7r4fKUplVM0Sgyl5W">/pages/UTe7r4fKUplVM0Sgyl5W</a> for the minimum amount and avoid bridging orders that are too small.</td></tr><tr><td>351003</td><td>unable to bridge: insufficient bridging liquidity</td><td>The quote request exceeds the maximum available bridging liquidity at the moment.</td><td>This is expected to be common (non-error) for upstreams that quote optimistically.<br><br>Simply try again later, and ensure this will not trick circuit breakers.</td></tr><tr><td>131003</td><td>failed to parse parameters</td><td>Issues with input parameters. Usually due to incorrect formats.</td><td>Check input format. Avoid passing floats in unsupported params like <code>amount_wei</code> or <code>timeout_millis</code></td></tr><tr><td>131004</td><td>invalid parameter</td><td>Issues with input parameters. Usually due to input conflicts or missing params.</td><td>Check the related API reference to see if any param is duplicated or missing.</td></tr><tr><td>201001</td><td>auth get api key is invalid</td><td>Auth error.</td><td>Use correct api key.</td></tr><tr><td>201005</td><td>rate reach limit</td><td>Rate limit is hit.</td><td>Reduce traffic.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.native.org/native-dev/build-with-native/swap-aggregators/crosschain-swap-api/miscellaneous/error-handling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
