Common Errors & Fixes
PreflightFailedError
Cause: Simulation failed; see error.logs.
Fix: Check balances/program rules; reduce CU or split instructions.
RpcRetriableError (429)
Cause: Rate limiting or throttling.
Fix: Backoff & retry; reduce burst; raise cuPriceMicroLamports.
TransactionTooLargeError
Cause: Serialized tx exceeds maxMessageSize.
Fix: Use ALTs or split into multiple transactions.
BlockhashStaleError
Cause: Blockhash expired before submit.
Fix: Rebuild with fresh blockhash.
RouterJsonRpcError / NetworkError
Cause: Router/transport issues.
Fix: Inspect code/message; retry or switch lanes.
Other Solana runtime errors via preflight logs: InsufficientFundsForRent, Blockhash not found, Account in use.