slightly better error reporting

This commit is contained in:
Vincent Breitmoser 2019-06-07 22:31:39 +02:00
parent 377b935bb8
commit 383858521c
No known key found for this signature in database
GPG Key ID: 7BD18320DEADFA11
1 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,7 @@ impl MyResponse {
}
pub fn ise(e: failure::Error) -> Self {
println!("Internal error: {:?}", e);
eprintln!("Internal error: {:?}", e);
let ctx = templates::FiveHundred{
internal_error: e.to_string(),
version: env!("VERGEN_SEMVER").to_string(),
@ -103,6 +103,7 @@ impl MyResponse {
}
pub fn bad_request(template: &'static str, e: failure::Error) -> Self {
eprintln!("Bad Request: {:?}", e);
let ctx = templates::General {
error: Some(format!("{}", e)),
version: env!("VERGEN_SEMVER").to_string(),