//! Error types for nx9-wg. #[derive(Debug, thiserror::Error)] pub enum Nx9Error { /// Validation error #[error("Validation error: {0}")] Validation(String), /// Database error #[error("Database error: {0}")] Database(String), /// WireGuard error #[error("WireGuard error: {0}")] WireGuard(String), /// Network error #[error("Network error: {0}")] Network(String), /// Authentication error #[error("Auth error: {0}")] Auth(String), /// Cryptography error #[error("Crypto error: {0}")] Crypto(String), /// Backup error #[error("Backup error: {0}")] Backup(String), /// Configuration error #[error("Config error: {0}")] Config(String), /// I/O error #[error("I/O error: {0}")] Io(#[from] std::io::Error), /// Internal error #[error("Internal error: {0}")] Internal(String), } pub type Result = std::result::Result;