acp_utils/server/error.rs
1/// Errors returned by ACP server-side outbound traffic.
2#[derive(Debug, thiserror::Error)]
3pub enum AcpServerError {
4 #[error("ACP protocol error during {operation}: {source}")]
5 Protocol {
6 operation: String,
7 #[source]
8 source: agent_client_protocol::Error,
9 },
10}
11
12impl AcpServerError {
13 pub fn protocol(operation: &'static str, source: agent_client_protocol::Error) -> Self {
14 Self::Protocol { operation: operation.to_string(), source }
15 }
16}