Flare
App

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

FieldWhat it is
codeOne of the codes below. Branch on it, never on the message.
messageA sentence to show the person.
retryableWhether the same request can succeed later.
stageWhere the flow failed: validation, auth, read, upload, build, wallet, co_sign, simulation, send or confirmation.
fieldErrorsOn VALIDATION_ERROR, messages per field path.
programErrorOn CHAIN_REFUSED, the program that refused: programId, name and number (its custom code).
retryAfterSecondsWhen retrying makes sense.
requestIdOn INTERNAL_ERROR.

Codes

CodeStatusRaised when
VALIDATION_ERROR400A 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.
UNAUTHORIZED401No route answers it: none needs a signed-in wallet.
ORIGIN_NOT_ALLOWED403A browser request from an origin the API does not list.
NOT_FOUND404No 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_UNAVAILABLE409A build or submit before the platform is live on chain, or while its lookup table settles.
CONFIGURATION_REQUIRED409A metadata upload when the API has no storage configured, or one whose URI would be too long.
IDEMPOTENCY_CONFLICT409A transaction submitted again after it was already sent.
TRANSACTION_EXPIRED409A launch signed and handed back after the server stopped holding its mint key. Build it again.
PAYLOAD_TOO_LARGE413A request body over the size limit.
UNSUPPORTED_MEDIA_TYPE415A JSON route sent anything but application/json, or the metadata upload sent anything but multipart/form-data.
SIMULATION_FAILED422The transaction failed simulation, or could not be built, without a program error to name.
CHAIN_REFUSED422A program refused the transaction in simulation or on chain; programError names it.
RATE_LIMITED429More than 60 writes (POST requests) from one client in a minute. retryAfterSeconds says when the window resets.
INTERNAL_ERROR500Anything unexpected. requestId identifies it.
UPSTREAM_UNAVAILABLE502The Solana RPC did not answer.
CURVE_COMPLETE409A 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_SMALL422A trade or first buy that rounds to nothing after fees.
IMAGE_INVALID400The upload’s image is not an image the API accepts.
IMAGE_TOO_LARGE413The upload’s image is over its size limit.
UPLOAD_FAILED502The metadata store refused or failed the upload.
MINT_STOCK_EMPTY503A launch when no launch mint is ready. Retry after retryAfterSeconds.
FLARE_EXPIRED410A 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 errorNext step
ExceededSlippageThe price moved. Build the trade again, or allow more slippage.
PoolMigrated, PoolFundingThe coin changed phase. Build the trade again.
InsufficientFundsThe 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.