Skip to main content
Every response from the Finrock API includes a standard HTTP status code that tells you whether your request succeeded and, if not, what category of problem occurred. Mapping each status code to a clear handling strategy in your application makes your integration more resilient and easier to debug.

Status Code Reference

Handling Common Errors

A 401 response means the server could not authenticate your request. Work through the following checklist:
  1. JWT expiry — JWTs issued by Finrock have a short validity window. Check the exp claim in your token to confirm it has not expired. Generate a fresh token if necessary.
  2. Nonce uniqueness — The JWT payload must include a unique nonce value for every request. Reusing a nonce causes the request to be rejected. Use a UUID or a monotonically incrementing counter.
  3. x-api-key header — Confirm the x-api-key header is present on the request and that its value matches the API key associated with your workspace.
  4. Authorization header format — The header must be in the form Authorization: Token {JWT}. Do not use Bearer as the prefix.
See the Authentication reference for full details on constructing a valid JWT.
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 asset on 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.
The response body will typically include a message field describing which field failed validation. Review it carefully, cross-reference the endpoint’s parameter documentation, and correct the payload before retrying.
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.
Contact your workspace administrator to adjust the permissions associated with your API key if you believe the access should be granted.
A 429 response means your application has exceeded the per-minute rate limit for this endpoint. To handle it correctly:
  1. Read the x-rate-limit-reset header in the response to find the exact timestamp when the window resets.
  2. Suspend all requests to that endpoint until the reset time passes.
  3. Resume sending requests after the reset.
If you are consistently hitting the rate limit under normal operating conditions, contact support@finrock.io to request a higher limit.
Do not retry a 429 response immediately. Tight-loop retries will not succeed and will delay your window reset. Always wait for the x-rate-limit-reset timestamp.
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:
  1. Wait 1–2 seconds after the first 500.
  2. Double the wait time on each subsequent failure (e.g., 2 s → 4 s → 8 s → 16 s).
  3. Set a maximum retry count (e.g., 5 attempts) and a maximum wait ceiling (e.g., 60 seconds).
  4. 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.