summaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 8140cfe..1efb082 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -4,11 +4,12 @@ use serde::Serialize;
use std::fmt;
use tokio_postgres::error::Error;
-#[derive(Debug)]
+#[derive(Debug, Eq, PartialEq)]
pub enum AppErrorType {
DbError,
NotFoundError,
AuthorizationError,
+ GitError,
}
#[derive(Debug)]
@@ -72,6 +73,7 @@ impl ResponseError for AppError {
AppErrorType::DbError => StatusCode::INTERNAL_SERVER_ERROR,
AppErrorType::NotFoundError => StatusCode::NOT_FOUND,
AppErrorType::AuthorizationError => StatusCode::UNAUTHORIZED,
+ AppErrorType::GitError => StatusCode::BAD_REQUEST,
}
}