mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 02:16:30 +00:00
improve error page
This commit is contained in:
parent
9f07308418
commit
3615e5982c
2 changed files with 7 additions and 4 deletions
|
@ -121,7 +121,8 @@ impl Server {
|
||||||
match repo_path_result {
|
match repo_path_result {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!(logger, "error: {}", err);
|
error!(logger, "error: {}", err);
|
||||||
let mut response = views::html::error::render("Could not parse repository URL", "");
|
let mut response = views::html::error::render("Could not parse repository path",
|
||||||
|
"Please make sure to provide a valid repository path.");
|
||||||
response.set_status(StatusCode::BadRequest);
|
response.set_status(StatusCode::BadRequest);
|
||||||
future::Either::A(future::ok(response))
|
future::Either::A(future::ok(response))
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,9 +5,11 @@ pub fn render(title: &str, descr: &str) -> Response {
|
||||||
super::render_html(title, html! {
|
super::render_html(title, html! {
|
||||||
section class="hero is-light" {
|
section class="hero is-light" {
|
||||||
div class="hero-head" (super::render_navbar())
|
div class="hero-head" (super::render_navbar())
|
||||||
div class="hero-body" {
|
}
|
||||||
div class="container" {
|
section class="section" {
|
||||||
p class="title is-1" (title)
|
div class="container" {
|
||||||
|
div class="notification is-danger" {
|
||||||
|
p class="title is-3" (title)
|
||||||
p (descr)
|
p (descr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue