Include IP in invalid admin token error

This commit is contained in:
Daniel García
2019-01-08 16:16:58 +01:00
parent 4309df8334
commit a0a08c4c5a
2 changed files with 13 additions and 2 deletions

View File

@@ -163,7 +163,11 @@ macro_rules! err_json {
#[macro_export]
macro_rules! err_handler {
($expr:expr) => {{
error!("Unauthorized Error: {:#?}", $expr);
error!("Unauthorized Error: {}", $expr);
return rocket::Outcome::Failure((rocket::http::Status::Unauthorized, $expr));
}};
($usr_msg:expr, $log_value:expr) => {{
error!("Unauthorized Error: {}. {}", $usr_msg, $log_value);
return rocket::Outcome::Failure((rocket::http::Status::Unauthorized, $usr_msg));
}};
}