Shader
Errors

DocsReference31 of 35 · 10 min read

Errors

Every error the API returns and every error the program raises, with what causes it.

An API error answers with the HTTP status from the table below and a JSON body { "error": { ... } } with these fields:

FieldTypeMeaning
codestringOne of the codes below.
messagestringA sentence to show a person.
retryablebooleanWhether the same request can succeed later unchanged.
stagestringWhere the request stopped.
fieldErrors (optional)object (free form)Per-field problems of a refused request body.
programError (optional)objectThe program, error name and code of an on-chain failure.
retryAfterSeconds (optional)integerSeconds to wait before retrying.
requestId (optional)stringIdentifier to quote when reporting the error.
requiredBaseUnits (optional)base unitsCredits the action needed, base units.
availableBaseUnits (optional)base unitsCredits available, base units.
capBaseUnits (optional)base unitsThe agent cap that was hit, base units.
spentBaseUnits (optional)base unitsWhat the agent key has spent today, base units.
expiresAt (optional)UTC timestampWhen the quote or request expired.
topUp (optional)booleanTrue when adding credits resolves the error.
reason (optional)stringFor x402, the machine-readable reason a payment was refused, such as quote_expired.

stage is one of validation, auth, read, upload, build, wallet, co_sign, simulation, send, confirmation. When a transaction fails on chain, programError names the program error from the second table.

#API errors

CodeHTTPRaised when
VALIDATION_ERROR400The request body or query does not match its schema. fieldErrors names the fields.
UNAUTHORIZED401The route needs a session or an agent token and the request has neither; the sign-in proof is wrong or already used; or an agent token called a route that builds a transaction for the wallet to sign.
ORIGIN_NOT_ALLOWED403A browser request came from an origin the API does not serve.
NOT_FOUND404The instance, job, receipt, transaction or GPU model does not exist for this caller.
PROGRAM_UNAVAILABLE409The on-chain program cannot be reached right now.
CONFIGURATION_REQUIRED409The action needs a configuration value that is not set yet, such as a generation provider key.
IDEMPOTENCY_CONFLICT409An idempotencyKey was reused with a different request.
TRANSACTION_EXPIRED409The built transaction's blockhash expired before it was signed and sent. Build it again.
PAYLOAD_TOO_LARGE413The request body is too large.
UNSUPPORTED_MEDIA_TYPE415The request body is not JSON.
SIMULATION_FAILED422The signed transaction failed simulation. programError names the program error.
CHAIN_REFUSED422The transaction landed and failed on chain. programError names the program error.
RATE_LIMITED429Too many requests. Wait retryAfterSeconds.
INTERNAL_ERROR500The API failed. Quote requestId when reporting it.
UPSTREAM_UNAVAILABLE502A service the API depends on (RPC, GPU provider, generation provider) did not answer.
AUTH_NONCE_EXPIRED401The sign-in nonce expired. Ask for a new one.
AUTH_SIGNATURE_INVALID401The sign-in signature does not verify for the public key.
SESSION_EXPIRED401The session has expired. Sign in again.
AGENT_TOKEN_INVALID401The bearer token is not a known agent token.
AGENT_TOKEN_REVOKED403The agent token's key has been revoked.
CREDITS_TOO_LOW409The balance is below what the action needs: a launch's headroom or a generation's estimate. requiredBaseUnits, availableBaseUnits and topUp say by how much.
GPU_SOLD_OUT409The GPU model has no free machine.
GPU_UNAVAILABLE503No machine of that model can be quoted right now.
INSTANCE_NOT_STOPPABLE409The instance is already stopping, stopped or failed.
INSTANCE_NOT_EXTENDABLE409The rental is not running, so it cannot be extended.
METER_ALREADY_REGISTERED409The rental's meter has already registered; a meter registers once.
EXTENSION_PENDING409The rental already has an extension that is not in use yet.
QUOTE_EXPIRED409The deposit quote expired. Ask for a new one.
QUOTE_ASSET_UNSUPPORTED409The asset is not a supported payment asset.
WALLET_REJECTED409The wallet declined to sign.
AGENT_CAP_EXCEEDED409The charge is above the agent key's per-request cap. capBaseUnits holds the cap.
AGENT_DAILY_CAP_EXCEEDED409The charge would take the agent key past its per-day cap. capBaseUnits and spentBaseUnits say how far.
AGENT_KEY_REVOKED409The agent key named in the request is revoked.
ASSET_NOT_LIVE409The asset has no mint yet: SHDR deposits and Earn wait for the token.
PAYMENT_REQUIRED402An x402 route was called without PAYMENT-SIGNATURE. The PAYMENT-REQUIRED header says what to pay.
PAYMENT_INVALID402The PAYMENT-SIGNATURE payload is not base64 JSON, or does not match the requirement it answers.
PAYMENT_SETTLEMENT_FAILED502The x402 payment verified but could not be settled on chain.
TRANSACTION_NOT_FOUND404No transaction with that id or signature is known.
NOT_IMPLEMENTED501The route is not available on this server yet.

#Program errors

Custom errors of the shader program. A failed transaction's logs show the code in hex; the first "Program … failed" line names the program it belongs to.

CodeNameMessageRaised by
6000 (0x1770)UnauthorizedThe caller is not authorized for this instructiondeposit_shdr, migrate_config, record_x402_revenue, set_require_meter, set_shdr_mint, settle, update_config, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue
6001 (0x1771)InvalidAuthorityThe requested authority is invalidinitialize, update_config
6002 (0x1772)InvalidFeeShareBpsFee share basis points must not exceed 10,000initialize, update_config
6003 (0x1773)InvalidMintThe supplied mint does not match configurationburn_used, claim, deposit_shdr, deposit_usdc, fund_earn, initialize, record_x402_revenue, set_shdr_mint, stake, sweep_fee_share, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue
6004 (0x1774)TokenProgramMismatchThe supplied token program does not own the mintburn_used, claim, deposit_shdr, deposit_usdc, fund_earn, initialize, record_x402_revenue, set_shdr_mint, stake, sweep_fee_share, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue
6005 (0x1775)ShdrMintNotSetThe SHDR mint has not been setburn_used, claim, deposit_shdr, fund_earn, stake, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake
6006 (0x1776)ShdrMintAlreadySetThe SHDR mint has already been setset_shdr_mint
6007 (0x1777)QuoteExpiredThe price quote has expireddeposit_shdr
6008 (0x1778)ZeroAmountAn amount must be greater than zerodeposit_shdr, deposit_usdc, fund_earn, record_x402_revenue, stake, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue
6009 (0x1779)ZeroCreditsCredits must be greater than zerodeposit_shdr
6010 (0x177a)NoTokensReceivedThe transfer credited no tokensdeposit_shdr, deposit_usdc, fund_earn, stake
6011 (0x177b)TreasuryBalanceDecreasedThe treasury balance unexpectedly decreaseddeposit_usdc
6012 (0x177c)EscrowBalanceDecreasedThe escrow balance unexpectedly decreaseddeposit_shdr
6013 (0x177d)RewardVaultBalanceDecreasedThe reward vault balance unexpectedly decreasedfund_earn
6014 (0x177e)StakeVaultBalanceDecreasedThe stake vault balance unexpectedly decreasedstake
6015 (0x177f)CreditAccountNotInitializedThe credit account is not initializedsettle
6016 (0x1780)CreditAccountWrongWalletThe credit account belongs to another walletdeposit_shdr, deposit_usdc, initialize
6017 (0x1781)NonceMismatchSettlement nonce does not matchsettle
6018 (0x1782)EmptySettlementSettlement must contain at least one linesettle
6019 (0x1783)InvalidSettlementKindSettlement kind is invalidsettle
6020 (0x1784)TooManySettlementLinesToo many settlement linessettle
6021 (0x1785)AgentKeyIndexOutOfBoundsAgent key index is out of boundssettle
6022 (0x1786)AgentKeyNotWritableAgent key must be writablesettle
6023 (0x1787)AgentKeyWrongWalletAgent key belongs to another walletrevoke_agent_key, settle, update_agent_key
6024 (0x1788)InvalidAgentKeyAgent key does not match its PDAsettle
6025 (0x1789)AgentKeyRevokedAgent key is revokedrevoke_agent_key, settle, update_agent_key
6026 (0x178a)PerRequestCapExceededThe requested amount exceeds the agent key request capsettle
6027 (0x178b)PerDayCapExceededThe requested amount exceeds the agent key daily capsettle
6028 (0x178c)InvalidLabelAgent key label is longer than 32 bytescreate_agent_key
6029 (0x178d)InvalidLaunchWalletLaunch wallet does not match configurationsweep_fee_share
6030 (0x178e)WithdrawExceedsRevenueThe withdrawal exceeds available revenuewithdraw_revenue
6031 (0x178f)ExcessWithdrawalExceedsAvailableThe withdrawal exceeds available excess tokenswithdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake
6032 (0x1790)ShdrEscrowStillOwedThe SHDR escrow still backs unused credits or pending burnswithdraw_excess_shdr
6033 (0x1791)InsufficientStakeInsufficient SHDR stakeunstake
6034 (0x1792)StakeWrongWalletEarn stake belongs to another walletclaim, stake, unstake
6035 (0x1793)MathOverflowArithmetic overflowburn_used, claim, deposit_shdr, deposit_usdc, fund_earn, record_x402_revenue, settle, stake, sweep_fee_share, unstake, withdraw_revenue
6036 (0x1794)MathUnderflowArithmetic underflowclaim, fund_earn, record_x402_revenue, settle, stake, sweep_fee_share, unstake, withdraw_excess_rewards, withdraw_revenue
6037 (0x1795)X402RevenueExceedsTreasuryThe treasury cannot cover outstanding USDC credits and the fee share after recording x402 revenuerecord_x402_revenue
6038 (0x1796)MeterSealMissingNo preceding Ed25519 instruction verifies this meter seal with local offsetschecked arithmetic and balance checks
6039 (0x1797)MeterKeyMismatchThe meter key or GPU UUID hash does not match the pinned identitychecked arithmetic and balance checks
6040 (0x1798)MeterUnitsExceedSignedSettlement units exceed the meter's signed countchecked arithmetic and balance checks
6041 (0x1799)MeterMinuteNotIncreasingThe meter's minute must increasechecked arithmetic and balance checks
6042 (0x179a)MeterRequiredThis rental must have a signed meter proofsettle
6043 (0x179b)MeterAccountMissingA metered line is missing its RentalMeter accountsettle
6044 (0x179c)InvalidMeterAccountThe RentalMeter account must be the writable PDA for the jobchecked arithmetic and balance checks
6045 (0x179d)MeterIdentityRequiredA new RentalMeter needs its meter key and GPU UUID hashchecked arithmetic and balance checks
6046 (0x179e)MeterRentalOnlyOnly rental lines can carry meter proofssettle
6047 (0x179f)MeterAlreadyClosedA last line must be the final metered line for its jobsettle
6048 (0x17a0)ConfigLayoutNotMigratableConfig is not a legacy account eligible for migrationmigrate_config