diff --git a/src/error.rs b/src/error.rs index f483aeb..238ddb4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -6,7 +6,7 @@ use reqwest::StatusCode; pub enum AppError { InternalError(String), OpenIdError(String), - Unauthorised + Unauthorised, } impl IntoResponse for AppError { @@ -14,7 +14,10 @@ impl IntoResponse for AppError { let (status, message) = match self { AppError::InternalError(msg) => (StatusCode::INTERNAL_SERVER_ERROR, msg), AppError::OpenIdError(msg) => (StatusCode::UNPROCESSABLE_ENTITY, msg), - AppError::Unauthorised => (StatusCode::UNAUTHORIZED, "Unauthorised (did you login?)".into()) + AppError::Unauthorised => ( + StatusCode::UNAUTHORIZED, + "Unauthorised (did you login?)".into(), + ), }; (status, message).into_response() }