XHR/Fetch Error Notifier

Notification Center: auto-minimize to corner button with badge, expand for error list; only show unread count as badge, no 'read' state.

Autor
chaiyanlin
Instalări zilnice
0
Total instalări
4
Rating-uri
0 0 0
Versiune
2025-07-10.3
Creat
09-07-2025
Actualizat
09-07-2025
Size
19,3 KB
Licență
MIT
Se aplică pe
Toate site-urile

Title: XHR/Fetch Error Notifier

Description: This userscript automatically notifies you via popup alerts when any XHR (XMLHttpRequest) or fetch request on any website returns a non-2xx HTTP status code (e.g., 4xx, 5xx), making it easier to detect and troubleshoot API/network errors during development or testing.

Features:

  • Monitors all outgoing fetch and XHR requests on the current webpage.
  • Triggers an alert popup whenever a request returns an error status code (not in 200–299 range).
  • Displays the error code and request URL for quick debugging.
  • Lightweight, works on all websites.

Typical use cases:

  • Front-end developers diagnosing AJAX/fetch failures.
  • QA testers who want to be instantly notified about backend/API errors during web app testing.
  • Anyone who needs to be immediately aware of HTTP errors on the page.

How to use:

  1. Install this script with a userscript manager such as Tampermonkey or Violentmonkey.
  2. The script works automatically—no configuration needed.
  3. Whenever a network request fails (returns 4xx/5xx, or fetch is rejected), you’ll see an alert with the error status and URL.

Note:If you prefer system notifications instead of alert popups, you can edit the script to use the Notification API.