Skip to content

Commit

Permalink
add error type
Browse files Browse the repository at this point in the history
  • Loading branch information
fankaiLiu committed Nov 20, 2023
1 parent c2a3a72 commit 998ed5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/template/src/app_error.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ pub enum AppError {
#[error("mongodb::bson::oid::Error`{0}`")]
MongoBsonOidError(#[from] MongoBsonOidError),
{{/if}}
{{#if need_db_conn}}
#[error("ValidationError:`{0}`")]
ValidationError(#[from] validator::ValidationErrors),
{{/if}}
}

pub type AppResult<T> = Result<T, AppError>;
Expand Down

0 comments on commit 998ed5a

Please sign in to comment.