From 323822a100640fe85a61d3f806fc96fb62143a35 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 3 Sep 2022 12:09:46 +0200 Subject: Remove generic error --- src/errors.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index e541eda..1ce4502 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -7,8 +7,6 @@ use serde_json::json; /// All errors raised by the web app pub enum AppError { - /// Generic error, never called yet - Generic, /// Database error Database, /// Generic bad request. It is handled with a message value @@ -30,10 +28,6 @@ impl IntoResponse for AppError { /// ``` fn into_response(self) -> Response { let (status, error_message) = match self { - AppError::Generic => ( - StatusCode::INTERNAL_SERVER_ERROR, - "Generic error, can't find why".to_string(), - ), AppError::Database => ( StatusCode::INTERNAL_SERVER_ERROR, "Error with database connection".to_string(), -- cgit v1.2.3-71-g8e6c