steer_workspace/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum WorkspaceError {
5    #[error("I/O error: {0}")]
6    Io(#[from] std::io::Error),
7
8    #[error("Tool execution failed: {0}")]
9    ToolExecution(String),
10
11    #[error("Transport error: {0}")]
12    Transport(String),
13
14    #[error("Status error: {0}")]
15    Status(String),
16
17    #[error("Not supported: {0}")]
18    NotSupported(String),
19
20    #[error("Invalid configuration: {0}")]
21    InvalidConfiguration(String),
22
23    #[error("Git error: {0}")]
24    Git(#[from] Box<dyn std::error::Error + Send + Sync + 'static>),
25
26    #[error("Tonic transport error: {0}")]
27    TonicTransport(#[from] tonic::transport::Error),
28
29    #[error("Tonic status error: {0}")]
30    TonicStatus(#[from] Box<tonic::Status>),
31}
32
33pub type Result<T> = std::result::Result<T, WorkspaceError>;