summaryrefslogtreecommitdiff
path: root/packages/cli/src
diff options
context:
space:
mode:
authorTaylor Mullen <[email protected]>2025-05-07 16:31:43 -0700
committerN. Taylor Mullen <[email protected]>2025-05-07 16:38:06 -0700
commit43c707b4e8232c32cd663c3d570704fbeaf6492b (patch)
tree84d57f72475bb35cec86e52c863a5f8b142cd446 /packages/cli/src
parent95ab38e8d6dfe6487879e2b036bbaaea2ecea037 (diff)
Continue to work through 429/500s.
- The root of this issue was actually a genai SDK bug that was fixed here: https://critique.corp.google.com/cl/753255997 - Upgrade to latest genai SDK for latest bug fixes (including the above) - Removed specific 429 handling for uncaught rejections. Fixes https://b.corp.google.com/issues/413760164
Diffstat (limited to 'packages/cli/src')
-rw-r--r--packages/cli/src/gemini.ts21
1 files changed, 0 insertions, 21 deletions
diff --git a/packages/cli/src/gemini.ts b/packages/cli/src/gemini.ts
index 0c57e708..940a1ba8 100644
--- a/packages/cli/src/gemini.ts
+++ b/packages/cli/src/gemini.ts
@@ -86,27 +86,6 @@ async function main() {
// --- Global Unhandled Rejection Handler ---
process.on('unhandledRejection', (reason, _promise) => {
- // Check if this is the known 429 ClientError that sometimes escapes
- // this is a workaround for a specific issue with the way we are calling gemini
- // where a 429 error is thrown but not caught, causing an unhandled rejection
- // TODO(adh): Remove this when the race condition is fixed
- const isKnownEscaped429 =
- reason instanceof Error &&
- reason.name === 'ClientError' &&
- reason.message.includes('got status: 429');
-
- if (isKnownEscaped429) {
- // Log it differently and DON'T exit, as it's likely already handled visually
- console.warn('-----------------------------------------');
- console.warn(
- 'WORKAROUND: Suppressed known escaped 429 Unhandled Rejection.',
- );
- console.warn('-----------------------------------------');
- console.warn('Reason:', reason);
- return;
- // No process.exit(1); Don't exit.
- }
-
// Log other unexpected unhandled rejections as critical errors
console.error('=========================================');
console.error('CRITICAL: Unhandled Promise Rejection!');