Skip to main content

sbe_proxy/
error.rs

1/// Errors from the sbe proxy server.
2#[derive(Debug, thiserror::Error)]
3pub enum ProxyError {
4    /// Failed to bind the TCP listener.
5    #[error("failed to bind proxy listener: {0}")]
6    Bind(#[source] std::io::Error),
7
8    /// Failed to accept a connection.
9    #[error("failed to accept connection: {0}")]
10    Accept(#[source] std::io::Error),
11
12    /// Failed to connect to upstream.
13    #[error("failed to connect to upstream {host}:{port}: {source}")]
14    UpstreamConnect {
15        host: String,
16        port: u16,
17        source: std::io::Error,
18    },
19}