From 4f749c7d88ba431a3ac4a382cd57fa88bc9c9a7d Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Wed, 30 Apr 2025 17:35:31 +0200 Subject: [PATCH] Log message when the dark theme cookie can't be read --- backend/src/app.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/app.rs b/backend/src/app.rs index 8e5b69e..01898df 100644 --- a/backend/src/app.rs +++ b/backend/src/app.rs @@ -393,7 +393,11 @@ async fn context( let tr = Tr::new(&language); let dark_theme = match jar.get(common::consts::COOKIE_DARK_THEME) { - Some(dark_theme_cookie) => dark_theme_cookie.value().parse().unwrap_or_default(), + Some(dark_theme_cookie) => dark_theme_cookie + .value() + .parse() + .inspect_err(|err| warn!("Can't parse dark theme cookie: {}", err)) + .unwrap_or_default(), None => false, };