Repository navigation
fix(web): show error state instead of empty state on invoice fetch failure - #559
Merged
Merged
Conversation
…fails The fetch to /api/stripe/invoices had no error handling, so a failed request silently rendered the "No invoices yet" empty state — indistinguishable from a real empty list. Now checks res.ok, parses the error body, and renders a distinct error state with a retry button, matching the pattern used in agent-section.tsx.
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
gkhngyk
approved these changes
Jul 30, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Thanks — clean fix, matches the sibling settings components and the non-JSON 500 case is handled nicely. One small ask: could you add Closes #550 to the PR description so the issue auto-closes on merge?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #550
Summary
invoice-list.tsxhad no error handling on its fetch to/api/stripe/invoices— a failed request silently rendered "No invoices yet," indistinguishable from a real empty listres.ok, parses the error body, and renders a distinct error state with a retry button, matching the pattern inagent-section.tsxTest plan
{error: "..."}, 500) — error message renders correctly, retry button works