Anchor
RequireViolated
“A require expression was violated”
A require!(condition, Error) macro failed, but the program used the default error instead of a custom one.
Common causes
- The condition inside
require!evaluated to false.
How to fix it
- Find the
require!in the instruction handler named in the logs. Prefer a custom error (require!(cond, MyError::X)) for clarity.