fix(catchers): return appropriate http status for internal server errors

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2020-12-17 21:26:00 +05:30
parent a0642019c2
commit 0e04aa2879
No known key found for this signature in database
GPG Key ID: DD0B4C26654BA8E4

View File

@ -52,7 +52,7 @@ pub fn forbidden() -> status::Custom<Json<Value>> {
#[catch(500)] #[catch(500)]
pub fn internal_server_error() -> status::Custom<Json<Value>> { pub fn internal_server_error() -> status::Custom<Json<Value>> {
status::Custom( status::Custom(
Status::NotFound, Status::InternalServerError,
Json(json!({ Json(json!({
"err":"internal server error", "err":"internal server error",
"msg": "Something went wrong, try again" "msg": "Something went wrong, try again"