Errors
VeTrade returns instructive error messages. The message explains what to change before retrying.
Common API error codes
INVALID_JSONINVALID_REQUESTMETHOD_NOT_ALLOWEDUPSTREAM_ROUTER_ERROR
Error envelope
{
"error": {
"code": "INVALID_REQUEST",
"message": "Correct the request body fields before retrying /v2/swap-plans.",
"action": "Update the listed fields and send the same request again.",
"details": {
"issues": [
{
"field": "recipient",
"message": "Provide recipient when mode is \"wallet_bound\" so the API can build clauses for a real wallet context."
}
]
},
"requestId": "REQUEST_ID",
"docsUrl": "https://vetrade.vet/developers/ai/overview"
}
}
Validation tip
When a request fails, inspect details.issues first. Those are the fields you need to correct before retrying.