We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 063ae70 commit f7d5f24Copy full SHA for f7d5f24
src/server.rs
@@ -15,13 +15,20 @@ pub fn serve() {
15
routes![api::all_fcps, api::member_fcps, api::github_webhook],
16
)
17
.mount("/", routes![html::all_fcps, html::member_fcps])
18
+ .register(catchers![not_found])
19
.launch();
20
});
21
22
ok_or!(result, why => error!("Rocket failed to ignite: {:?}", why));
23
}
24
25
26
+#[catch(404)]
27
+fn not_found(req: &rocket::Request<'_>) -> String {
28
+ info!("No matching routes for {} {}", req.method(), req.uri());
29
+ format!("`{}` is not a valid path.", req.uri())
30
+}
31
+
32
mod html {
33
use super::TEMPLATES;
34
use crate::error::DashResult;
0 commit comments