Skip to main content

kftray_helper/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum HelperError {
5    #[error("IO error: {0}")]
6    Io(#[from] std::io::Error),
7
8    #[error("JSON serialization error: {0}")]
9    Json(#[from] serde_json::Error),
10
11    #[error("Network configuration error: {0}")]
12    NetworkConfig(String),
13
14    #[error("Address pool error: {0}")]
15    AddressPool(String),
16
17    #[error("Communication error: {0}")]
18    Communication(String),
19
20    #[error("Platform service error: {0}")]
21    PlatformService(String),
22
23    #[error("Authentication error: {0}")]
24    Authentication(String),
25
26    #[error("Invalid message format: {0}")]
27    InvalidMessage(String),
28
29    #[error("Operation not supported on this platform")]
30    UnsupportedPlatform,
31}