Skip to content

Commit c9acc68

Browse files
authored
Merge pull request #12 from QuantGeekDev/fix/invalid-catcher
feat: remove 204 catcher
2 parents 6d4d640 + cc24259 commit c9acc68

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/catchers/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,3 @@ pub fn internal_server_error(req: &Request) -> Json<ErrorResponse> {
3232
message: "Internal Server Error".to_string(),
3333
})
3434
}
35-
36-
#[catch(204)]
37-
pub fn no_content(req: &Request) -> Json<ErrorResponse> {
38-
Json(ErrorResponse {
39-
status: 204,
40-
message: "No Content".to_string(),
41-
})
42-
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ fn rocket() -> _ {
2929
dotenv().ok();
3030

3131
rocket::build().mount("/", routes![index, create_snack, list_snacks, update_snack, delete_snack]).register("/", catchers![catchers::unauthorized, catchers::not_found,
32-
catchers::no_content, catchers::internal_server_error])
32+
catchers::internal_server_error])
3333
}
3434

0 commit comments

Comments
 (0)