ilmen_http/http/errors/
http_errors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use thiserror::Error;


#[derive(Error, Debug, PartialEq, Eq)]
pub enum HttpError
{
    #[error("An error occured")]
    DefaultError,

    #[error("Not found: {0}")]
    NotFoundError(String),

    #[error("Authorization Error: {0}")]
    UnauthorizedError(String),

    #[error("Bad Request: {0}")]
    BadRequest(String)

}