The most expensive thing isn’t the bug—it’s misleading error messages that send you down the wrong path.
Our backend logged “server data unreadable” for two days; we checked the entire server—logs showed all 200s. The real culprit was stale scripts running in the browser crashing when rendering new data, while catch all exceptions were grouped into “server data unreadable”. This tool does two things: paste your existing catch block to check whether it’s misreporting; then generate a version that properly distinguishesNetwork failure / Rendering crash / Key expired / Timeout's code.
—
| Actual situation | What should be reported | Cost of reporting errors |
|---|---|---|
| Network/connection failure | Network unstable—retried N times; showing local cache first. | Reporting it as a server failure → leads to unnecessary backend investigation. |
| Data arrived but rendering crashed | Script version expired—press Ctrl+F5 to force-refresh. | Reported as server failure → Wasted two days going down the wrong path |
| 401 / 403 | The key has expired. Refresh the page and log in again. | Having users continuously click Retry will never resolve the issue. |
| Timeout (AbortError) | Interface timeout—refresh and try again shortly | Confusing it with “the server is down” |
| Empty data format / missing fields | Data has arrived but field X is missing | Silently rendering as 0 is more dangerous than throwing an error. |
1 · A single catch clause handles all errors.Rendering crashes, network failures, expired keys, and timeouts are all lumped into “server data unreadable”—we spent two days hunting nonexistent issues on the server.
2 · The fix is traffic splitting, not adding logs.try Only data fetching inside; wrap rendering separately tryReport them as two separate sentences—pinpointing the root cause takes just one sentence.
3 · Fallback is more important than error reporting.On complete failure, render using the last good data from localStorage, labeled “Cached data · N minutes ago”, so users always see content—not an error wall.
4 · Do not retry on 401/403 errors.Retrying three times on an incorrect key only makes the user wait longer—just tell them to refresh and log in again