Skip to main content Swig Wallet Error Reference
This document provides a comprehensive list of all error types used throughout the Swig wallet system, including their numeric codes and meanings.
For the complete source code and latest updates, see the Swig Wallet repository .
Search Errors
Error Code Ranges
1000-1999 : State errors (swig_state::SwigStateError)
2000-2999 : Instruction processing errors (swig_instructions::InstructionError)
3000-3999 : Authentication errors (swig_state::SwigAuthenticateError)
0-999 : Program errors (swig_program::SwigError)
State Errors (swig_state::SwigStateError)
Located in: state/src/lib.rs:91-108
These errors are related to state management operations and data validation.
Authentication Errors (swig_state::SwigAuthenticateError)
Located in: state/src/lib.rs:111-178
These errors are related to authentication operations and permission validation.
Program Errors (swig_program::SwigError)
Located in: program/src/error.rs:20-115
These errors can occur during program execution and are categorized by functionality.
Instruction Processing Errors (swig_instructions::InstructionError)
Located in: instructions/src/lib.rs:25-32
These errors can occur during instruction processing and parsing.
SDK Errors (rust_sdk::SwigError)
Located in: rust-sdk/src/error.rs:4-80
These errors occur in the Rust SDK when interacting with the Swig wallet system.
Common Error Patterns
Most permission errors start with PermissionDenied and are in the 3000+ range. These indicate various authorization failures.
Data Validation Errors
Errors starting with Invalid typically indicate malformed or invalid data structures.
Errors containing Account in the name relate to account validation, ownership, or state issues.
Errors containing Signature or cryptographic scheme names (like Secp256k1, Secp256r1) relate to signature validation failures.