diff options
Diffstat (limited to 'server/src/errors.rs')
| -rw-r--r-- | server/src/errors.rs | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/errors.rs b/server/src/errors.rs index d991132..304d744 100644 --- a/server/src/errors.rs +++ b/server/src/errors.rs @@ -11,6 +11,7 @@ pub enum AppError {      BadRequest(String),      NotFound,      TokenCreation, +    InvalidToken,  }  impl IntoResponse for AppError { @@ -30,6 +31,7 @@ impl IntoResponse for AppError {                  StatusCode::INTERNAL_SERVER_ERROR,                  "Token creation error".to_string(),              ), +            AppError::InvalidToken => (StatusCode::BAD_REQUEST, "Invalid token".to_string()),          };          let body = Json(json!({  |