Skip to main content

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.

NameTypeDescription
codeintegerError code.
typestringError type.
messagestringError 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 codeError description
400Slippage value couldn't be processed.
422Invalid swap/intent status.
422Invalid address.
422Network or token couldn’t be processed.
422Intent couldn’t be processed.
422Invalid amount.
422Swap amount is too large.
422Swap amount is too small.
422Swap type unsupported for requested token.
422Intent signature validation failed on provider side.
422Invalid balance.
500Provider internal error.
500Internal error.