mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
Set log level for 404
This commit is contained in:
18
src/app.rs
18
src/app.rs
@@ -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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user