fix: show and log gas estimation error#1083
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds proper error handling to the fee estimation flow. The fee quote hook now captures and logs errors from the query, which propagate through the form component up to the button—allowing it to display an error message when estimation fails rather than leaving users guessing. Changes
🚥 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. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@claude review |
|
Claude finished @Xaroz's task in 2m 18s —— View job Claude PR Review
Overall: Solid, focused fix. Surfacing a previously-silent failure both in logs and UI is a clear win. A few minor observations below. Findings1. Stale-fees + error inconsistency (minor UX) React Query v5 (the version pinned in
The button's label and the modal's content disagree. Two reasonable options:
I'd lean toward the first — consistent with "no current estimate available." const isClickable = hasFees && !isLoading && !isError;2. Nested ternary readability (nit) CLAUDE.md prefers flattened conditionals. The 3-deep ternary is fine but extracting helps: const feeText = (() => {
if (isLoading) return loadingText;
if (isError) return 'Estimation failed';
return hasFees ? fees.totalFees : '-';
})();Not blocking — judgment call. 3. Logging duplicated on each refetch failure (intentional? worth confirming)
4.
5. No tests added Summary
|
Before the gas estimation failed silently, now we log the error and show "Estimation failed" instead of "-" in the ui