Recognize Claude weekly limits (#16)
Recognize Claude’s actual weekly-limit message and continue to the next configured profile. The regression uses the production message from the failed migration review. Root suite: 38 passed. Reviewed-on: #16 Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
This commit was merged in pull request #16.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ export type BotProfile = {
|
||||
};
|
||||
|
||||
function isUsageExhausted(error: unknown): boolean {
|
||||
return /(?:usage|rate) limit|hit your limit|insufficient_quota|exceeded your current quota|too many requests|(?:api error|http error|http|status(?: code)?)[ :]+4(?:02|29)\b/i
|
||||
return /(?:usage|rate) limit|hit your (?:weekly )?limit|insufficient_quota|exceeded your current quota|too many requests|(?:api error|http error|http|status(?: code)?)[ :]+4(?:02|29)\b/i
|
||||
.test(String(error));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user