#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum NetError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("protocol error: {0}")]
Protocol(String),
#[error("authentication failed: {0}")]
Auth(String),
#[error("remote error: {0}")]
Remote(String),
#[error("envelope decode: {0}")]
Envelope(#[from] serde_json::Error),
#[error("timeout")]
Timeout,
#[error("operation not supported over this transport: {0}")]
Unsupported(&'static str),
#[error("malformed location: {0}")]
BadLocation(String),
}