feat: add debug error printing
Got a random error message while coding (still have no idea what sent it), this will let you run the code with debug logging if you arent sure where errors are coming from
This commit is contained in:
parent
81f7527c79
commit
d6364a0dc0
1 changed files with 2 additions and 1 deletions
|
@ -10,7 +10,7 @@ use diesel_async::pooled_connection::PoolError as DieselPoolError;
|
|||
use tokio::task::JoinError;
|
||||
use serde_json::Error as JsonError;
|
||||
use toml::de::Error as TomlError;
|
||||
use log::error;
|
||||
use log::{debug, error};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
|
@ -54,6 +54,7 @@ pub enum Error {
|
|||
|
||||
impl ResponseError for Error {
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
debug!("{:?}", self);
|
||||
error!("{}: {}", self.status_code(), self.to_string());
|
||||
|
||||
HttpResponse::build(self.status_code())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue