//! The type that represents all erros in `sfr-server`.

use crate::error::BoxError;

/// The type that represents all erros in `sfr-server`.
#[derive(thiserror::Error, Debug)]
pub enum ServerError {
    /// The error represents that the logger was failed to initialize.
    #[error("failed to initialize logger")]
    FailedToInitializeLogger(BoxError),

    /// The error while binding socket.
    #[error("failed to bind socket: {0}")]
    FailedToBindSocket(BoxError),

    /// The error represents that the server was failed to start to serve.
    #[error("failed to serve")]
    FailedToServe(BoxError),

    /// The error represents an invalid status code.
    #[error("invalid status code")]
    InvalidStatusCode(BoxError),
}
