Errors Overview
aura-core program error codes and troubleshooting
aura-core returns Anchor errors from the AuraCoreError enum, starting at code 6000. Domain-layer TreasuryErrors are mapped to these at the instruction boundary.
Error code range
All aura-core errors are in the 6000-6139 range (140 errors). Errors below 6000 are Anchor framework errors.
Error Categories
Authorization
Why: Control who can perform actions. These errors prevent unauthorized access to treasury operations, protecting against malicious actors or misconfigured permissions.
Execution
Why: Enforce proposal lifecycle rules. These errors ensure proposals follow the correct state machine, timelock requirements, and approval flows before execution.
Confidential
Why: Protect FHE encryption integrity. These errors validate that encrypted guardrails are properly configured and decryption follows the secure protocol.
Wallets & Limits
Why: Enforce spending limits and balance checks. These errors prevent overdrafts, ensure wallets are active, and validate that spending stays within configured caps.
Policy & Templates
Why: Maintain policy consistency and validation. These errors ensure policy configurations are coherent, templates are valid, and governance rules are followed.
Fees & Billing
Why: Control monetization and fee collection. These errors enforce protocol fee floors, validate billing schedules, and ensure proper fee accounting.
Trust & Recovery
Why: Enable emergency controls and threat response. These errors manage trust tier enforcement, ownership handovers, and break-glass recovery mechanisms.
Multichain
Why: Validate cross-chain execution and oracles. These errors ensure chain-specific replay protection, oracle data integrity, and settlement confirmation.
Common Patterns
Error Code Format
6XXX | ErrorName | DescriptionHandling Errors
Most errors include contextual information about what triggered them. Always check:
- The specific instruction that failed
- Account states involved
- Policy rules that were violated
- Resource limits that were exceeded