Error Codes
Exhaustive list of possible error codes
API status codes
API status code is the code returned by the server like 200, 404, 429, 500, 502.
API error codes
API returns the following set of error codes:
- DefaultError = 1000,
- FailedToBuildTransactionError = 1001,
- NoQuoteError = 1002,
- NotFoundError = 1003,
- NotProcessableError = 1004,
- RateLimitError = 1005,
- ServerError = 1006,
- SlippageError = 1007,
- ThirdPartyError = 1008,
- TimeoutError = 1009,
- UnauthorizedError = 1010,
- ValidationError = 1011,
- RpcFailure = 1012,
- MalformedSchema = 1013,
Tool errors
In addition to returning status and error codes, API may return error messages for underlying tools, describing an issue with specific tools. This can be caused by many reasons, from the tool simply not supporting the requested token pair or insufficient liquidity.
To better explain failure cases, we try to return errors in a predictable format. The ToolError
interface looks like the following:
Possible codes:
NO_POSSIBLE_ROUTE
: No route was found for this action.
INSUFFICIENT_LIQUIDITY
: The tool’s liquidity is insufficient.
TOOL_TIMEOUT
: The third-party tool timed out.
UNKNOWN_ERROR
: An unknown error occurred.
RPC_ERROR
: There was a problem getting on-chain data. Please try again later.
AMOUNT_TOO_LOW
:The initial amount is too low to transfer using this tool.
AMOUNT_TOO_HIGH
: The initial amount is too high to transfer using this tool.
FEES_HGHER_THAN_AMOUNT
: The fees are higher than the initial amount — this would result in negative resulting token.
DIFFERENT_RECIPIENT_NOT_SUPPORTED
: This tool does not support different recipient addresses.
TOOL_SPECIFIC_ERROR
: The third-party tool returned an error.
CANNOT_GUARANTEE_MIN_AMOUNT
: The tool cannot guarantee that the minimum amount will be met.