From b06f658fc5ff66f03335a2cb47bfdfaf566f6cfc Mon Sep 17 00:00:00 2001 From: Will Chen Date: Fri, 15 Aug 2025 14:29:28 -0700 Subject: [PATCH] Add link for rate limit errors (#956) --- src/components/chat/ChatErrorBox.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/chat/ChatErrorBox.tsx b/src/components/chat/ChatErrorBox.tsx index b925653..22059aa 100644 --- a/src/components/chat/ChatErrorBox.tsx +++ b/src/components/chat/ChatErrorBox.tsx @@ -18,22 +18,32 @@ export function ChatErrorBox({ {error} - Access with Dyad Pro. + Access with Dyad Pro - + {" "} + or switch to another model. ); } // Important, this needs to come after the "free quota tier" check // because it also includes this URL in the error message - if (error.includes("https://ai.google.dev/gemini-api/docs/rate-limits")) { + if ( + error.includes("Resource has been exhausted") || + error.includes("https://ai.google.dev/gemini-api/docs/rate-limits") + ) { return ( {error} - Upgrade to Dyad Pro. + Upgrade to Dyad Pro + + {" "} + or read the + + + Rate limit troubleshooting guide.