Skip to main content

anyclaw_sdk_service/
error.rs

1/// Errors that can occur in service SDK operations.
2#[derive(Debug, thiserror::Error)]
3pub enum ServiceSdkError {
4    /// Initialization of the service failed.
5    #[error("initialization failed: {0}")]
6    InitFailed(String),
7    /// Shutdown of the service failed.
8    #[error("shutdown failed: {0}")]
9    ShutdownFailed(String),
10    /// An I/O error occurred during communication.
11    #[error("IO error: {0}")]
12    Io(#[from] std::io::Error),
13    /// A JSON serialization/deserialization error occurred.
14    #[error("JSON error: {0}")]
15    Json(#[from] serde_json::Error),
16    /// An internal error with a descriptive message.
17    #[error("{0}")]
18    Internal(String),
19}