summaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-03 10:09:46 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-09-03 10:09:46 +0000
commit323822a100640fe85a61d3f806fc96fb62143a35 (patch)
tree56d91553db0fe043936dce4918526a69ad0fce16 /src/errors.rs
parentc42d3291da9e43c090945cd8dc04c51b99d013fb (diff)
Remove generic error
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs6
1 files changed, 0 insertions, 6 deletions
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(),