Normalize panic message and return 400 or 404 when suitable

This commit is contained in:
Trinity Pointard
2018-10-20 11:04:20 +02:00
parent 4e6f3209d5
commit fd92383f87
14 changed files with 162 additions and 161 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ fn init_pool() -> Option<DbPool> {
}
fn main() {
let pool = init_pool().expect("Couldn't intialize database pool");
let pool = init_pool().expect("main: database pool initialization error");
rocket::ignite()
.mount("/", routes![
routes::blogs::paginated_details,
@@ -176,6 +176,6 @@ fn main() {
("/login".to_owned(), "/login".to_owned(), rocket::http::Method::Post),
("/users/new".to_owned(), "/users/new".to_owned(), rocket::http::Method::Post),
])
.finalize().unwrap())
.finalize().expect("main: csrf fairing creation error"))
.launch();
}