Skip to content

Commit

Permalink
Merge pull request #19 from felix1251/develop
Browse files Browse the repository at this point in the history
wrong error message in sign up
  • Loading branch information
felix1251 authored Jan 9, 2024
2 parents dc49fa3 + 87af2ed commit 0f21135
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/routes/auth/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,9 @@ pub async fn sign_up(
.save(&db)
.await
.map_err(|err| match err {
sea_orm::DbErr::Query(_err) => AppError::new(
StatusCode::UNPROCESSABLE_ENTITY,
"User does not exist or Invalid",
),
sea_orm::DbErr::Query(_err) => {
AppError::new(StatusCode::UNPROCESSABLE_ENTITY, "User exist or Invalid")
}
_else => AppError::new(StatusCode::INTERNAL_SERVER_ERROR, "INTERNAL_SERVER_ERROR"),
})?;

Expand Down

0 comments on commit 0f21135

Please sign in to comment.