From 70b94f454bff5c7785caaf2664d67c823be71a7b Mon Sep 17 00:00:00 2001 From: Syfaro Date: Fri, 17 Jan 2020 18:31:26 -0600 Subject: [PATCH] Log rejections. --- src/handlers.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/handlers.rs b/src/handlers.rs index 04e4c40..217196f 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1,7 +1,7 @@ use crate::types::*; use crate::utils::{extract_e621_rows, extract_fa_rows}; use crate::{rate_limit, Pool}; -use log::debug; +use log::{info, debug}; use warp::{reject, Rejection, Reply}; fn map_bb8_err(err: bb8::RunError) -> Rejection { @@ -207,6 +207,8 @@ pub async fn search_file( } pub async fn handle_rejection(err: Rejection) -> Result { + info!("Had rejection: {:?}", err); + let (code, message) = if err.is_not_found() { ( warp::http::StatusCode::NOT_FOUND,