Skip to main content

max / goingson

Log the OAuth-token lookup failure in build_jmap_client An Err from the token lookup was discarded and execution fell through to JmapClient::new with a possibly-empty token, so a transient storage blip reached the user as an opaque auth failure. Warn with the account and the underlying error; the fallthrough stays.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-30 23:49 UTC
Signed with PGP, not checked
Commit: 0371ee2830f98455084d7f7aa77bba4b4de6b970
Parent: 099d9dd
1 file changed, +10 insertions, -1 deletion
@@ -397,7 +397,16 @@
397 397 access_token = tok;
398 398 }
399 399 }
400 - Err(_) => {}
400 + // Refresh failed: fall through with whatever token we already have, which
401 + // may be expired. Log it so the resulting auth failure is diagnosable.
402 + Err(e) => {
403 + warn!(
404 + account_id = %id,
405 + email = %account.email_address,
406 + "OAuth token refresh failed, continuing with existing token: {}",
407 + e
408 + );
409 + }
401 410 }
402 411 }
403 412