mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 00:59:18 +02:00
28 lines
612 B
Rust
28 lines
612 B
Rust
use serde::Serialize;
|
|
|
|
#[derive(Serialize)]
|
|
pub struct ErrorMessage {
|
|
pub(crate) code: u16,
|
|
pub(crate) message: String,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct InternalServerError;
|
|
impl warp::reject::Reject for InternalServerError {}
|
|
|
|
#[derive(Debug)]
|
|
pub struct BadRequestError;
|
|
impl warp::reject::Reject for BadRequestError {}
|
|
|
|
#[derive(Debug)]
|
|
pub struct NotFoundError;
|
|
impl warp::reject::Reject for NotFoundError {}
|
|
|
|
#[derive(Debug)]
|
|
pub struct UnauthorizedError;
|
|
impl warp::reject::Reject for UnauthorizedError {}
|
|
|
|
#[derive(Debug)]
|
|
pub struct ForbiddenError;
|
|
impl warp::reject::Reject for ForbiddenError {}
|
|
|