Status Code Reference
Handling Common Errors
400 Bad Request — Fixing Malformed Payloads
400 Bad Request — Fixing Malformed Payloads
A
400 response means your request body or query parameters do not conform to the API schema. Common causes include:- A required field is missing (e.g., omitting
asseton a create-wallet request). - A field value is in the wrong type or format (e.g., passing a string where a number is required).
- An enum value is invalid (e.g., using an unsupported
destination_type). - An asset ticker is misspelled or not supported.
403 Forbidden — Checking Permissions
403 Forbidden — Checking Permissions
A
403 response means your credentials are valid, but the authenticated user or API key does not have the required permissions for the requested operation. This commonly occurs when:- An API key scoped to read-only operations attempts a write (e.g., creating a transaction).
- A request targets a resource (such as a wallet or sub-account) that belongs to a different workspace.
429 Too Many Requests — Backing Off and Retrying
429 Too Many Requests — Backing Off and Retrying
A
429 response means your application has exceeded the per-minute rate limit for this endpoint. To handle it correctly:- Read the
x-rate-limit-resetheader in the response to find the exact timestamp when the window resets. - Suspend all requests to that endpoint until the reset time passes.
- Resume sending requests after the reset.
500 Internal Server Error — Retry with Exponential Backoff
500 Internal Server Error — Retry with Exponential Backoff
A
500 response indicates a transient server-side issue. These are uncommon but can occur during periods of high load or brief platform maintenance. Implement exponential backoff to retry safely:- Wait 1–2 seconds after the first
500. - Double the wait time on each subsequent failure (e.g., 2 s → 4 s → 8 s → 16 s).
- Set a maximum retry count (e.g., 5 attempts) and a maximum wait ceiling (e.g., 60 seconds).
- If the error persists beyond your retry budget, alert your on-call team and contact support@finrock.io.
For transaction submission (
POST /dac/v1/transaction), always use a sequence_id when retrying after a 500. This ensures that even if the first request was processed server-side before the error was returned, a retry with the same sequence_id will return the original transaction rather than creating a duplicate. See the Idempotency reference for details.