Getting started›Errors
Errors
One error shape, with a type you can code against.
The error shape
Every failure has the same body. message is written for a person; type is what to code against; param names the field at fault, when there is one; code names a refusal you may want to handle on its own, when it has one.
JSON
{
"error": {
"type": "invalid_request",
"message": "amount must be a positive number.",
"param": "amount"
}
}Types
| type | Status | What it means |
|---|---|---|
invalid_request | 400, 404 | Something in the request is wrong, or what it names doesn't exist for your business. |
authentication | 401 | No key, or a key that isn't valid here. |
permission | 403 | The key lacks the scope, the call came from an address not on its allowlist, or the end user is restricted. |
conflict | 409 | An idempotency key reused for a different request, or still running. |
rate_limit | 429 | More than 1,200 requests in a minute with one key. |
api_error | 5xx | Something failed on Solace's side. Retry with the same idempotency key. |
Codes
| code | Status | What it means |
|---|---|---|
end_user_restricted | 403 | The end user is restricted, by your API or your team in the console: no withdrawals, swaps or transfers out until it's lifted with POST /end-users/{id}/unrestrict. |
end_user_unverified | 403 | Your policy lets unverified end users deposit only, and this one isn't verified. Set it with POST /end-users/{id}, or change the policy. |
limit_exceeded | 400 | The withdrawal is over your per-transaction, daily or monthly limit (Policies); the message says which. |
business_limit_exceeded | 400 | Your business is on the limited tier, and this live withdrawal would take what your business withdrew today or this month (UTC) over the limited tier's cap. The message says which cap. Nothing was sent. See Caps on the limited tier. |
address_blocked | 403 | Sanctions screening blocked the destination. Nothing was sent; the end user can't fix this by retrying. |
address_on_hold | 400 | The address is new to the end user and your policy holds new addresses; the message says until when. |
screening_unavailable | 503 | The destination couldn't be screened right now, so nothing was sent. Retry in a moment with the same idempotency key. |
JSON
{
"error": {
"type": "permission",
"code": "end_user_restricted",
"message": "This end user is restricted, so nothing can leave their balance. Lift it with POST /platform/v1/end-users/{id}/unrestrict."
}
}