[Frontend] Handle rejections in webhook toggle/delete handlers
Overview & Background
The webhook toggle and delete handlers are async with no try/catch, and WebhookTable invokes them from onClick without void/.catch() — the return value is discarded by React. Any API failure becomes an unhandled promise rejection with no user feedback and no state rollback (the toggle UI still flips optimistically via a refetch that never runs). Delete also uses raw window.confirm, inconsistent with the custom confirm modals used everywhere else.
Technical Specification & Architecture
- Wrap handlers in
frontend/src/app/settings/webhooks/page.tsx:23withtry/catchandtoast.errorfeedback. - Call them as
onClick={() => void onToggle(subscription).catch(...)}fromfrontend/src/components/webhooks/WebhookTable.tsx:9, or fold the async logic into a mutation hook. - Replace
window.confirmwith the sharedConfirmModal/CancelConfirmModalpattern.
Target Files
frontend/src/app/settings/webhooks/page.tsxfrontend/src/components/webhooks/WebhookTable.tsx
Acceptance Criteria
- [ ] API failures surface an error toast and leave state consistent.
- [ ] No unhandled promise rejections in console.
- [ ] Delete uses the shared confirm modal.
- [ ] Tests assert error handling on toggle/delete rejection.
@samjay8 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
I can fix this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @samjay8 to this issue.
Congratulations, @samjay8! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.
🧑💻 @samjay8: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @samjay8 as part of the Stellar Wave Program's 11th Wave 🥳
😎 @samjay8: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.