DeFi API Errors
Each DeFi API error response returns an object with the following parameters.
Error response schema
The error response schema is the same for each API method.
| Name | Type | Description |
|---|---|---|
| code | integer | Error code. |
| type | string | Error type. |
| message | string | Error message. |
Sample error response
{
"code": 400,
"type": "validation_error",
"message": "body.from.DirectionByTokenIdFrom.refund_address is required"
}
Error codes
Each API method can return one of the error codes from the following table.
| Error code | Error description |
|---|---|
400 | Slippage value couldn't be processed. |
422 | Invalid swap/intent status. |
422 | Invalid address. |
422 | Network or token couldn’t be processed. |
422 | Intent couldn’t be processed. |
422 | Invalid amount. |
422 | Swap amount is too large. |
422 | Swap amount is too small. |
422 | Swap type unsupported for requested token. |
422 | Intent signature validation failed on provider side. |
422 | Invalid balance. |
500 | Provider internal error. |
500 | Internal error. |