Skip to main content

max / goingson

Surface keyring error variant in token-store error message Previously the Display impl alone — keyring's Display is generic ("Platform error"). Adding Debug ({:?}) preserves the variant so postmortems can tell a missing-keychain from a permission denial. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-05-14 19:26 UTC
Commit: fbe2797adbc90b372ec389338f9289f0e70532c7
Parent: 54bc9f9
1 file changed, +5 insertions, -5 deletions
@@ -10,7 +10,7 @@
10 10
11 11 use keyring::Entry;
12 12 use serde::{Deserialize, Serialize};
13 - use tracing::{debug, error, warn};
13 + use tracing::{debug, error, info, warn};
14 14 use uuid::Uuid;
15 15
16 16 const SERVICE_NAME: &str = "goingson";
@@ -268,9 +268,9 @@ impl CredentialStore {
268 268
269 269 entry
270 270 .set_password(&json)
271 - .map_err(|e| format!("Failed to store sync token in keychain: {}", e))?;
271 + .map_err(|e| format!("Failed to store sync token in keychain: {} ({:?})", e, e))?;
272 272
273 - debug!("Stored sync token for user {}", user_id);
273 + info!("Stored sync token in keychain for user {}", user_id);
274 274 Ok(())
275 275 }
276 276
@@ -297,11 +297,11 @@ impl CredentialStore {
297 297 }
298 298 },
299 299 Err(keyring::Error::NoEntry) => {
300 - debug!("No sync token found in keychain");
300 + info!("No sync token in keychain (NoEntry)");
301 301 None
302 302 }
303 303 Err(e) => {
304 - warn!("Failed to retrieve sync token from keychain: {}", e);
304 + warn!("Keychain sync token retrieval failed: {} ({:?})", e, e);
305 305 None
306 306 }
307 307 }