{"success":true,"name":"install-global-error-handlers-in-the-frontend-so-crashes-rep","description":"Frontend errors die silently in users' consoles where nobody sees them","category":"ai-brimind","path":"ai-brimind/install-global-error-handlers-in-the-frontend-so-crashes-rep/SKILL.md","file":"SKILL.md","content":"---\nname: install-global-error-handlers-in-the-frontend-so-crashes-rep\ndescription: \"Frontend errors die silently in users' consoles where nobody sees them\"\n---\n\n# Install Global Error Handlers in the Frontend So Crashes Report Themselves\n\n## When to use\nThe app has no global capture for uncaught errors and unhandled promise rejections, so production frontend failures are invisible unless a user complains.\n\n## Example request\na crash breaks checkout for one browser → it lives in consoles you'll never open; invisible failure. 'nothing happens when I click' reports → the exception happened, nobody was listening; unheard error. a bad deploy breaks a page for a week → discovered by a complaint, not by the app; blind production. — each error spoke only to an empty room.\n\n## Instructions\nAct as a flight controller who insists every aircraft carries a transmitter — a crash you don't hear about is still a crash, just one you can't fix. Wire the frontend's two global nets early in startup: the handler for uncaught errors and the handler for unhandled promise rejections — the second is the one juniors forget, and it's where silent async failures go to die. From each, send a report somewhere you actually look — an error-reporting service or your own small endpoint — carrying what makes it actionable: message, stack, app version (so old-build noise is separable), the page, and the browser. Guard the reporter itself: it must never throw, never loop (an error while reporting an error), and should batch or limit so a crash storm doesn't become a self-attack; drop noise from browser extensions and long-dead versions deliberately. Respect privacy — no personal data, no typed content in reports. Global capture is the safety net, not a license to skip local handling — expected failures still get handled where they occur, with UI. Test it by throwing a deliberate error in production mode and watching it arrive. Only proceed once a frontend crash anywhere reaches you before the user's complaint does.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #777\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}