(&self, f: &mut std::fmt::Formatter<'_>)
| 55 | |
| 56 | impl std::fmt::Display for AppError { |
| 57 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 58 | match self { |
| 59 | AppError::BadRequest(err) => write!(f, "Bad Request: {err}"), |
| 60 | AppError::Unauthorized(err) => write!(f, "Unauthorized: {err}"), |
| 61 | AppError::Forbidden(err) => write!(f, "Forbidden: {err}"), |
| 62 | AppError::NotFound(err) => write!(f, "Not Found: {err}"), |
| 63 | AppError::MethodNotAllowed(err) => write!(f, "Method not allowed: {err}"), |
| 64 | AppError::InternalServerError(err) => write!(f, "Internal Server Error: {err}"), |
| 65 | AppError::NotAcceptable(err) => write!(f, "Not Acceptable: {err}"), |
| 66 | AppError::PayloadTooLarge(err) => write!(f, "Payload Too Large: {err}"), |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | #[derive(Clone, Debug)] |
nothing calls this directly
no outgoing calls
no test coverage detected