fix: add 30s timeouts to all HTTP clients#72
Conversation
Every reqwest client was built with Client::new(), which has no request timeout, so a slow/unresponsive RPC node, Brevo, Groq, or Google endpoint would hold a task/connection open indefinitely (server resource exhaustion; the CLI appears to freeze). Build clients with a 30s timeout, falling back to the default client if the builder ever fails. Covers backend services (sui, ai, email), the Google OAuth client, the CLI login client, and all five chain adapters (sui, ethereum, solana, aptos, soroban). Closes #36
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request adds a uniform 30-second request timeout to all ChangesHTTP Client Request Timeouts
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Every
reqwestclient was created withClient::new(), which has no request timeout. A slow or unresponsive upstream (RPC node, Brevo, Groq, Google) would hold a Tokio task/connection open forever — server-side resource exhaustion, and the CLI just appears to freeze with no error.Changes
Build each client with a 30s timeout, falling back to the default client if the builder ever fails:
Testing
cargo check --workspacepasses.Closes #36
Summary by CodeRabbit
Bug Fixes