acp_utils/client/error.rs
1/// Errors returned by ACP client-side operations.
2#[derive(Debug, thiserror::Error)]
3pub enum AcpClientError {
4 #[error("failed to spawn agent subprocess: {0}")]
5 SpawnFailed(#[source] std::io::Error),
6
7 #[error("agent subprocess crashed: {0}")]
8 AgentCrashed(String),
9
10 #[error("ACP protocol error: {0}")]
11 Protocol(#[source] agent_client_protocol::Error),
12}
13
14impl From<agent_client_protocol::Error> for AcpClientError {
15 fn from(e: agent_client_protocol::Error) -> Self {
16 Self::Protocol(e)
17 }
18}