diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-03-18 12:19:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-18 12:19:25 +0100 |
commit | 77715d93b2112b7d231db541ecce6ddca5c762c7 (patch) | |
tree | c3718080abcbe0a6cc52735bcc6726952c6494a8 /src/errors.rs | |
parent | b8e22e372cb947771aa122767a4405afa208226e (diff) | |
parent | 7bdd6d8f2d18022c34986a6eea4620d8eb6dcb3a (diff) |
Merge pull request #18 from gico-net/feat/git2
Create commits from a new Git Repository
Diffstat (limited to 'src/errors.rs')
-rw-r--r-- | src/errors.rs | 4 |
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, } } |