Reference
Errors
The error envelope and every code.
Every failed response has the same body: one error object with a stable code. Branch on code, show message, and use retryable and retryAfterSeconds to decide whether to try again.
error-flare-expired
{
"error": {
"code": "FLARE_EXPIRED",
"message": "This flare's window has closed. Its curve no longer takes trades here.",
"retryable": false,
"stage": "build"
}
}The envelope
| Field | What it is |
|---|---|
code | One of the codes below. Branch on it, never on the message. |
message | A sentence to show the person. |
retryable | Whether the same request can succeed later. |
stage | Where the flow failed: validation, auth, read, upload, build, wallet, co_sign, simulation, send or confirmation. |
fieldErrors | On VALIDATION_ERROR, messages per field path. |
programError | On CHAIN_REFUSED, the program that refused: programId, name and number (its custom code). |
retryAfterSeconds | When retrying makes sense. |
requestId | On INTERNAL_ERROR. |
Codes
| Code | Status | Raised when |
|---|---|---|
VALIDATION_ERROR | 400 | A body, query or path value fails its schema (fieldErrors names each field), a window outside the platform’s range, or a signed transaction the wallet rejected or changed. |
UNAUTHORIZED | 401 | No route answers it: none needs a signed-in wallet. |
ORIGIN_NOT_ALLOWED | 403 | A browser request from an origin the API does not list. |
NOT_FOUND | 404 | No flare with this mint launched on Flare, a build id the API doesn’t hold, or an unknown route. A flare launched a moment ago answers it as retryable while it is indexed. |
PROGRAM_UNAVAILABLE | 409 | A build or submit before the platform is live on chain, or while its lookup table settles. |
CONFIGURATION_REQUIRED | 409 | A metadata upload when the API has no storage configured, or one whose URI would be too long. |
IDEMPOTENCY_CONFLICT | 409 | A transaction submitted again after it was already sent. |
TRANSACTION_EXPIRED | 409 | A launch signed and handed back after the server stopped holding its mint key. Build it again. |
PAYLOAD_TOO_LARGE | 413 | A request body over the size limit. |
UNSUPPORTED_MEDIA_TYPE | 415 | A JSON route sent anything but application/json, or the metadata upload sent anything but multipart/form-data. |
SIMULATION_FAILED | 422 | The transaction failed simulation, or could not be built, without a program error to name. |
CHAIN_REFUSED | 422 | A program refused the transaction in simulation or on chain; programError names it. |
RATE_LIMITED | 429 | More than 60 writes (POST requests) from one client in a minute. retryAfterSeconds says when the window resets. |
INTERNAL_ERROR | 500 | Anything unexpected. requestId identifies it. |
UPSTREAM_UNAVAILABLE | 502 | The Solana RPC did not answer. |
CURVE_COMPLETE | 409 | A trade on a curve that sold out and waits for Raydium’s migration, or on a graduated pool with no liquidity yet. Retry after retryAfterSeconds; trading resumes on the CPMM pool. |
QUOTE_TOO_SMALL | 422 | A trade or first buy that rounds to nothing after fees. |
IMAGE_INVALID | 400 | The upload’s image is not an image the API accepts. |
IMAGE_TOO_LARGE | 413 | The upload’s image is over its size limit. |
UPLOAD_FAILED | 502 | The metadata store refused or failed the upload. |
MINT_STOCK_EMPTY | 503 | A launch when no launch mint is ready. Retry after retryAfterSeconds. |
FLARE_EXPIRED | 410 | A trade build on a flare whose window has closed before its curve sold out. |
Failed transactions
A transaction that fails after it was submitted doesn't answer an error envelope. GET /v1/transactions/:id answers status: "failed" with an error: the stage it failed at (build, wallet-rejected, wallet-changed, simulation, send or confirm), a message, whether building again can succeed, and the program that refused it. For these program errors it adds a nextStep:
| Program error | Next step |
|---|---|
ExceededSlippage | The price moved. Build the trade again, or allow more slippage. |
PoolMigrated, PoolFunding | The coin changed phase. Build the trade again. |
InsufficientFunds | The wallet holds fewer tokens than this trade needs. |
wallet-changed (stage) | Build the transaction again and sign the new copy. |
program names the program by its address as well as its error, since LaunchLab and CPMM number their custom errors from the same range.