sfr_types/error/server.rs
1//! The type that represents all erros in `sfr-server`.
2
3use crate::error::BoxError;
4
5/// The type that represents all erros in `sfr-server`.
6#[derive(thiserror::Error, Debug)]
7pub enum ServerError {
8 /// The error represents that the logger was failed to initialize.
9 #[error("failed to initialize logger")]
10 FailedToInitializeLogger(BoxError),
11
12 /// The error while binding socket.
13 #[error("failed to bind socket: {0}")]
14 FailedToBindSocket(BoxError),
15
16 /// The error represents that the server was failed to start to serve.
17 #[error("failed to serve")]
18 FailedToServe(BoxError),
19
20 /// The error represents an invalid status code.
21 #[error("invalid status code")]
22 InvalidStatusCode(BoxError),
23}