mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 14:16:21 +00:00
fix(quota): add explicit 429 rate limit handling
Match pattern from quota-fetcher-codex.ts for consistent user-friendly error messages when rate limited.
This commit is contained in:
@@ -427,6 +427,15 @@ async function fetchAvailableModels(accessToken: string, _projectId: string): Pr
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (response.status === 429) {
|
||||||
|
return {
|
||||||
|
success: false,
|
||||||
|
models: [],
|
||||||
|
lastUpdated: Date.now(),
|
||||||
|
error: 'Rate limited - try again later',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user