attuned_http/
error.rs

1//! HTTP error types.
2
3use thiserror::Error;
4
5/// HTTP server errors.
6#[derive(Debug, Error)]
7#[non_exhaustive]
8pub enum HttpError {
9    /// Failed to bind to address.
10    #[error("failed to bind to {addr}: {message}")]
11    Bind {
12        /// The address that failed to bind.
13        addr: String,
14        /// Error message.
15        message: String,
16    },
17
18    /// Request handling error.
19    #[error("request error: {0}")]
20    Request(String),
21
22    /// Store error.
23    #[error("store error: {0}")]
24    Store(#[from] attuned_store::StoreError),
25}