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.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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.