ptth/crates/ptth_server/src/errors.rs

17 lines
445 B
Rust
Raw Normal View History

use thiserror::Error;
#[derive (Debug, Error)]
pub enum ServerError {
#[error ("File server error")]
FileServer (#[from] super::file_server::errors::FileServerError),
#[error ("Hyper HTTP error")]
Http (#[from] hyper::http::Error),
#[error ("Hyper invalid header name")]
InvalidHeaderName (#[from] hyper::header::InvalidHeaderName),
#[error ("Can't parse wrapped requests")]
CantParseWrappedRequests (rmp_serde::decode::Error),
}