mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Better API error messages
This commit is contained in:
@@ -815,16 +815,7 @@ export class Cline {
|
|||||||
// Automatically retry with delay
|
// Automatically retry with delay
|
||||||
await this.say(
|
await this.say(
|
||||||
"error",
|
"error",
|
||||||
`Error (${
|
`${error.message ?? "Unknown error"} ↺ Retrying in ${requestDelay} seconds...`,
|
||||||
error.message?.toLowerCase().includes("429") ||
|
|
||||||
error.message?.toLowerCase().includes("rate limit") ||
|
|
||||||
error.message?.toLowerCase().includes("too many requests") ||
|
|
||||||
error.message?.toLowerCase().includes("throttled")
|
|
||||||
? "rate limit"
|
|
||||||
: error.message?.includes("500") || error.message?.includes("503")
|
|
||||||
? "internal server error"
|
|
||||||
: "unknown"
|
|
||||||
}). ↺ Retrying in ${requestDelay} seconds...`,
|
|
||||||
)
|
)
|
||||||
await this.say("api_req_retry_delayed")
|
await this.say("api_req_retry_delayed")
|
||||||
await delay(requestDelay * 1000)
|
await delay(requestDelay * 1000)
|
||||||
|
|||||||
Reference in New Issue
Block a user