Skip to content

Commit 477f9ba

Browse files
committed
fix(codex-manager): surface quota-cache save failures in the menu refresh
Review follow-up: refreshQuotaCacheForMenu now guards saveQuotaCache with the same console.warn pattern as the health check's save, so a transient Windows EBUSY/EPERM no longer vanishes into the caller's background .catch with zero diagnostics. https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
1 parent a49f6f9 commit 477f9ba

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

lib/codex-manager/login-menu-data.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,17 @@ export async function refreshQuotaCacheForMenu(
205205
}
206206

207207
if (changed) {
208-
await saveQuotaCache(nextCache);
208+
try {
209+
await saveQuotaCache(nextCache);
210+
} catch (error) {
211+
// Quota cache is a derived artifact; a transient Windows EBUSY/EPERM
212+
// here must not fail the menu refresh, but it should not vanish into
213+
// the caller's background .catch either (same pattern as the health
214+
// check's save).
215+
console.warn(
216+
`Quota cache save failed: ${error instanceof Error ? error.message : String(error)}`,
217+
);
218+
}
209219
}
210220

211221
return nextCache;

0 commit comments

Comments
 (0)