Set log level for 404

This commit is contained in:
Lennart
2025-06-14 14:57:42 +02:00
parent 26941c621b
commit e653c68cae

View File

@@ -126,12 +126,18 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
if response.status().is_server_error() { if response.status().is_server_error() {
tracing::error!("server error"); tracing::error!("server error");
} else if response.status().is_client_error() { } else if response.status().is_client_error() {
if response.status() == StatusCode::UNAUTHORIZED { match response.status() {
// The iOS client always tries an unauthenticated request first so StatusCode::UNAUTHORIZED => {
// logging 401's as errors would clog up our logs // The iOS client always tries an unauthenticated request first so
tracing::debug!("unauthorized"); // logging 401's as errors would clog up our logs
} else { tracing::debug!("unauthorized");
tracing::error!("client error"); }
StatusCode::NOT_FOUND => {
tracing::warn!("client error");
}
_ => {
tracing::error!("client error");
}
} }
}; };
}) })