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:

{
  "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.

Please note that for endpoints that typically return an array, when they encounter an error, the response will be in object format.

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.

351015

requested amount smaller than token out minimum wei [xxx]

The buying (bridge to) token amount is too small.

Check Minimum Bridge To Amount for the minimum amount and avoid bridging orders that are too small.

351003

unable to bridge: insufficient bridging liquidity

The quote request exceeds the maximum available bridging liquidity at the moment.

This is expected to be common (non-error) for upstreams that quote optimistically. Simply try again later, and ensure this will not trick circuit breakers.

131003

failed to parse parameters

Issues with input parameters. Usually due to incorrect formats.

Check input format. Avoid passing floats in unsupported params like amount_wei or timeout_millis

131004

invalid parameter

Issues with input parameters. Usually due to input conflicts or missing params.

Check the related API reference to see if any param is duplicated or missing.

201001

auth get api key is invalid

Auth error.

Use correct api key.

201005

rate reach limit

Rate limit is hit.

Reduce traffic.

Last updated