manually log errors in our SiteError ResponseError implementation
actix's `Logger` middleware would do this too for us, but it also logs all requests in a "web access log" style which i find personally extremely annoying and unhelpful
This commit is contained in:
parent
672408c3eb
commit
54b431810e
|
@ -67,6 +67,7 @@ pub enum SiteError {
|
|||
|
||||
impl actix_web::error::ResponseError for SiteError {
|
||||
fn error_response(&self) -> HttpResponse<BoxBody> {
|
||||
log::error!("Error response: {:?}", self);
|
||||
let status_code = self.status_code();
|
||||
HttpResponse::build(status_code) //
|
||||
.insert_header(ContentType::plaintext())
|
||||
|
|
Loading…
Reference in a new issue