Plume/src/routes/errors.rs

16 lines
309 B
Rust
Raw Normal View History

2018-06-18 17:59:49 +02:00
use rocket_contrib::Template;
#[catch(404)]
fn not_found() -> Template {
Template::render("errors/404", json!({
"error_message": "Page not found"
}))
}
#[catch(500)]
fn server_error() -> Template {
Template::render("errors/500", json!({
"error_message": "Server error"
}))
}