From 62092cc875a2b8d2e73e27b9d57919ec5dadf718 Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Sun, 10 May 2026 21:27:19 +0800 Subject: [PATCH] refactor(quotaConfigs.ts): make Chatgpt-Account-Id header optional to handle missing account IDs gracefully --- src/components/quota/quotaConfigs.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/quota/quotaConfigs.ts b/src/components/quota/quotaConfigs.ts index 7ca5d81..8f46711 100644 --- a/src/components/quota/quotaConfigs.ts +++ b/src/components/quota/quotaConfigs.ts @@ -410,14 +410,13 @@ const fetchCodexQuota = async ( const planTypeFromFile = resolveCodexPlanType(file); const accountId = resolveCodexChatgptAccountId(file); - if (!accountId) { - throw new Error(t('codex_quota.missing_account_id')); - } const requestHeader: Record = { ...CODEX_REQUEST_HEADERS, - 'Chatgpt-Account-Id': accountId, }; + if (accountId) { + requestHeader['Chatgpt-Account-Id'] = accountId; + } const result = await apiCallApi.request({ authIndex,