Skip to main content

ccs_proxy/
error.rs

1use std::path::PathBuf;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum ServeError {
6    #[error("failed to bind proxy port: {0}")]
7    BindProxy(#[source] std::io::Error),
8
9    #[error("failed to bind api port: {0}")]
10    BindApi(#[source] std::io::Error),
11
12    #[error("data dir creation failed at {path}: {source}")]
13    DataDir {
14        path: PathBuf,
15        #[source]
16        source: std::io::Error,
17    },
18
19    #[error("unsupported platform: {0}")]
20    UnsupportedPlatform(&'static str),
21
22    #[error("internal: {0}")]
23    Internal(#[from] anyhow::Error),
24}