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:
Radical 2025-05-23 20:33:42 +02:00
parent 81f7527c79
commit d6364a0dc0

View file

@ -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())