Skip to content

Commit 62092cc

Browse files
committed
refactor(quotaConfigs.ts): make Chatgpt-Account-Id header optional to handle missing account IDs gracefully
1 parent 126f7fa commit 62092cc

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/components/quota/quotaConfigs.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,13 @@ const fetchCodexQuota = async (
410410

411411
const planTypeFromFile = resolveCodexPlanType(file);
412412
const accountId = resolveCodexChatgptAccountId(file);
413-
if (!accountId) {
414-
throw new Error(t('codex_quota.missing_account_id'));
415-
}
416413

417414
const requestHeader: Record<string, string> = {
418415
...CODEX_REQUEST_HEADERS,
419-
'Chatgpt-Account-Id': accountId,
420416
};
417+
if (accountId) {
418+
requestHeader['Chatgpt-Account-Id'] = accountId;
419+
}
421420

422421
const result = await apiCallApi.request({
423422
authIndex,

0 commit comments

Comments
 (0)