This commit is contained in:
2021-10-29 18:42:35 +02:00
parent f2c470ed3d
commit 5a41743fc3
2 changed files with 5 additions and 5 deletions

View File

@@ -153,7 +153,10 @@ async fn handle_rejection(err: warp::Rejection) -> Result<impl warp::Reply, Infa
} else if let Some(InvalidUuid) = err.find() {
code = StatusCode::BAD_REQUEST;
message = "INVALID_UUID";
} else if err.find::<warp::filters::body::BodyDeserializeError>().is_some() {
} else if err
.find::<warp::filters::body::BodyDeserializeError>()
.is_some()
{
message = "BAD_REQUEST";
code = StatusCode::BAD_REQUEST;
} else if err.find::<warp::reject::MethodNotAllowed>().is_some() {