mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-11 03:13:12 +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:
1 parent
4fd2f601f6
commit
e596ab487d
1 file changed
+9
@@ -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