Search across all documentation pages
9 pages in this section.
How Solana programs fail cleanly, log with compute discipline, emit structured events, and become decodable for clients and ops.
Learn to handle errors in Solana programs with Rust. Explore 10 examples, from basic ProgramResult and built-in errors to custom error codes and CPI error bubbling.
Learn to create custom error enums in Anchor and Rust to translate business failures into stable u32 codes. Understand IDL export, code ranges, and best practices
Learn to use msg! for effective, compute unit-aware logging in Solana programs. Understand its costs, best practices, and common pitfalls.
Learn best practices for Rust program errors and logs. Balance observability with cost by using stable error codes, gated logs, and structured events.
A single-page roundup of every highlight bullet from the 8 pages in the Errors & Logs section, grouped by source page so you can scan all 46 takeaways without opening each article individually.