@solana/kit error codes
All 334 SolanaError codes from @solana/errors 8.4.0. Production builds of Kit strip messages and print "Solana error #<code>" with an npx command; paste that line below to decode it, context included.
General
14 codesEarly, uncategorised errors: blockhash expiry, nonces, number parsing, and failures to send or sign.
JSON-RPC server errors
26 codesErrors returned by the RPC node itself. The numeric code is the JSON-RPC error code from the server (negative numbers), wrapped by Kit.
Addresses and PDAs
12 codesBase58 address validation and program derived address derivation.
Account fetching and decoding
5 codesHelpers like `fetchEncodedAccount` and `assertAccountExists`.
SubtleCrypto availability
8 codesThe runtime lacks part of the WebCrypto API (Ed25519 key generation, signing, verification or digest).
Crypto
1 codesRandom value generation.
Keys and signatures
7 codesKey pair construction, signature byte lengths and key extractability.
File system
1 codesReading keypairs from disk.
Instruction shape
3 codesAn instruction object is missing data, accounts or the expected program address.
Instruction errors (on-chain)
55 codesKit's typed wrappers around the runtime's `InstructionError` variants. The same errors exist in the legacy format; see the linked page for causes and fixes.
Signers
13 codesTransaction and message signer plumbing: missing fee payer signer, wrong signer type, address mismatch.
Off-chain messages
20 codesEncoding and validating off-chain signed messages (application domain, format, length limits).
Transaction building
41 codesAssembling, compiling, signing and size-checking transaction messages.
Transaction introspection
2 codesDecoding `getTransaction` responses back into transaction objects.
Transaction errors (on-chain)
37 codesKit's typed wrappers around the runtime's `TransactionError` variants, such as blockhash not found or insufficient funds for fee.
Instruction plans
13 codesThe instruction-plan executor could not pack or execute a plan.
Codecs
30 codesEncoding and decoding bytes: wrong sizes, out-of-range numbers, enum discriminators, sentinels, invalid strings.
Fixed-point numbers
13 codesFixed-point arithmetic helpers (precision, overflow, parsing).
RPC transport
4 codesHTTP transport layer errors when talking to an RPC endpoint.
RPC subscriptions (WebSocket)
5 codesWebSocket connection and subscription lifecycle errors.
Subscribable
2 codesInternal subscription iterator errors.
Program clients
8 codesGenerated program clients: unknown instruction or account discriminators, wrong program address.
Wallets
4 codesWallet Standard integration errors.
React hooks
3 codesMisuse of the Kit React hooks.
Invariant violations
7 codesInternal consistency checks that should never fail in normal use.