Skip to main content

trojan_core/
errors.rs

1//! Error type constants for metrics and logging.
2//!
3//! These constants provide consistent error classification across all crates.
4
5/// TLS handshake error.
6pub const ERROR_TLS_HANDSHAKE: &str = "tls_handshake";
7/// Protocol parsing/validation error.
8pub const ERROR_PROTOCOL: &str = "protocol";
9/// I/O error.
10pub const ERROR_IO: &str = "io";
11/// DNS/address resolution error.
12pub const ERROR_RESOLVE: &str = "resolve";
13/// Timeout error.
14pub const ERROR_TIMEOUT: &str = "timeout";
15/// Authentication error.
16pub const ERROR_AUTH: &str = "auth";
17/// Configuration error.
18pub const ERROR_CONFIG: &str = "config";