Search across all documentation pages
9 pages in this section.
How Anchor programs fail with #[error_code] and require!, emit structured events, budget logs, and become decodable for clients.
Learn to declare custom error codes in Anchor using #[error_code] enums and assert conditions with require! macros for client-decodable failures.
Define custom error messages for Rust enum variants using #[msg("..."). Learn to map error codes in client-side applications and ensure stability.
Learn to use #[event] types and the emit! macro to write structured logs for indexers. Understand when to use events and how they work.
Learn best practices for creating observable and debuggable Anchor programs using typed errors, structured events, and minimal logging.
A single-page roundup of every highlight bullet from the 8 pages in the Anchor Errors section, grouped by source page so you can scan all 46 takeaways without opening each article individually.