Skip to main content

opencode_orchestrator_mcp/
error.rs

1#[derive(Debug)]
2pub enum OrchestratorError {
3    ExternalServerUnavailable { base_url: String, reason: String },
4}
5
6impl std::fmt::Display for OrchestratorError {
7    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8        match self {
9            Self::ExternalServerUnavailable { base_url, reason } => {
10                write!(
11                    f,
12                    "External OpenCode server unavailable (base_url={base_url}): {reason}"
13                )
14            }
15        }
16    }
17}
18
19impl std::error::Error for OrchestratorError {}