GasTankerDocs

Errors

Every error has a stable code and says whether retrying can help.

{
  "error": {
    "code": "IDEMPOTENCY_KEY_CONFLICT",
    "message": "IDEMPOTENCY_KEY_CONFLICT",
    "retryable": false
  }
}

Branch on code. message is for people and may change. retryable is true only when sending the same request again may succeed. Every error the API returns today is false, so fix the request first; the exception is a 500, which is worth retrying later with the same Idempotency-Key.

StatusCodeWhat to do
400IDEMPOTENCY_KEY_REQUIREDAdd an Idempotency-Key header to the POST.
400POLICY_NOT_FOUNDGive the wallet an active policy in the workspace.
400VALIDATION_ERRORFix the request body or parameters to match the API reference.
400INVALID_REQUEST_BODYSend the body as valid JSON with Content-Type: application/json.
400INVALID_CURSORPass cursor exactly as the previous page's nextCursor returned it.
400UNSUPPORTED_NETWORKRegister the wallet on a network that GET /v1/networks lists.
400INVALID_EVM_ADDRESS, INVALID_SOLANA_ADDRESS, INVALID_STELLAR_ADDRESS, INVALID_SUI_ADDRESSThe address isn't valid for the wallet's network. Send it in full; a mixed-case EVM address must have a valid checksum.
401UNAUTHENTICATEDSend a valid, enabled X-API-Key. A key that has used its daily request allowance is rejected until the allowance resets.
403FORBIDDENUse a key with the access this endpoint needs.
403STEP_UP_UNSUPPORTED_FOR_API_KEYDo this in the workspace; API keys can't.
404NOT_FOUNDCheck the ID. It may belong to another organization.
409IDEMPOTENCY_KEY_CONFLICTUse a new key for a different request.
409WALLET_ALREADY_EXISTSThe wallet is already registered; list wallets to find it.
429WALLET_LIMIT_REACHEDYour organization has reached its wallet limit. Contact us.
500INTERNAL_ERRORSomething failed on our side. Retry later with the same Idempotency-Key; contact us if it continues.