From e653c68cae639d05c8e21144d652dc6873c4b655 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Sat, 14 Jun 2025 14:57:42 +0200 Subject: [PATCH] Set log level for 404 --- src/app.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/app.rs b/src/app.rs index 38990e3..4b2189c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -126,12 +126,18 @@ pub fn make_app( if response.status().is_server_error() { tracing::error!("server error"); } else if response.status().is_client_error() { - if response.status() == StatusCode::UNAUTHORIZED { - // The iOS client always tries an unauthenticated request first so - // logging 401's as errors would clog up our logs - tracing::debug!("unauthorized"); - } else { - tracing::error!("client error"); + match response.status() { + StatusCode::UNAUTHORIZED => { + // The iOS client always tries an unauthenticated request first so + // logging 401's as errors would clog up our logs + tracing::debug!("unauthorized"); + } + StatusCode::NOT_FOUND => { + tracing::warn!("client error"); + } + _ => { + tracing::error!("client error"); + } } }; })