mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-21 18:06: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 {
|
||||
Err(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);
|
||||
future::Either::A(future::ok(response))
|
||||
},
|
||||
|
|
|
@ -5,9 +5,11 @@ pub fn render(title: &str, descr: &str) -> Response {
|
|||
super::render_html(title, html! {
|
||||
section class="hero is-light" {
|
||||
div class="hero-head" (super::render_navbar())
|
||||
div class="hero-body" {
|
||||
div class="container" {
|
||||
p class="title is-1" (title)
|
||||
}
|
||||
section class="section" {
|
||||
div class="container" {
|
||||
div class="notification is-danger" {
|
||||
p class="title is-3" (title)
|
||||
p (descr)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue