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.
| Code | Error | Description |
|---|
Authentication Errors (swig_state::SwigAuthenticateError)
Located in: state/src/lib.rs:111-178
These errors are related to authentication operations and permission validation.
| Code | Error | Description |
|---|
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.
| Code | Error | Description |
|---|
Instruction Processing Errors (swig_instructions::InstructionError)
Located in: instructions/src/lib.rs:25-32
These errors can occur during instruction processing and parsing.
| Code | Error | Description |
|---|
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.
| Error | Description |
|---|
Common Error Patterns
Permission-Related Errors
Most permission errors start withPermissionDenied and are in the 3000+ range. These indicate various authorization failures.
Data Validation Errors
Errors starting withInvalid typically indicate malformed or invalid data structures.
Account-Related Errors
Errors containingAccount in the name relate to account validation, ownership, or state issues.
Signature-Related Errors
Errors containingSignature or cryptographic scheme names (like Secp256k1, Secp256r1) relate to signature validation failures.
