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.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
chaiyanlin
今日安裝
0
安裝總數
4
評價
0 0 0
版本
2025-07-10.3
建立日期
2025-07-09
更新日期
2025-07-09
尺寸
19.3 KB
授權條款
MIT
腳本執行於
所有網站

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.