heartbeat-monitor/node_modules/next/dist/client/react-client-callbacks/shared.js
Matt Bruce bed1169443 Initial commit: Heartbeat Monitor dashboard
- Full-featured monitoring dashboard for local web apps
- Real-time status tracking with uptime percentages
- Visual sparklines for status history
- Add/Edit/Delete apps dynamically
- Categories and color coding
- Auto-refresh every 30 seconds
- API endpoints for apps and status management
2026-02-18 11:16:01 -06:00

37 lines
1.7 KiB
JavaScript

// This module can be shared between both pages router and app router
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "onRecoverableError", {
enumerable: true,
get: function() {
return onRecoverableError;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _bailouttocsr = require("../../shared/lib/lazy-dynamic/bailout-to-csr");
const _reportglobalerror = require("./report-global-error");
const _stitchederror = require("../components/react-dev-overlay/internal/helpers/stitched-error");
const _iserror = /*#__PURE__*/ _interop_require_default._(require("../../lib/is-error"));
const onRecoverableError = (error, errorInfo)=>{
// x-ref: https://github.com/facebook/react/pull/28736
const cause = (0, _iserror.default)(error) && 'cause' in error ? error.cause : error;
const stitchedError = (0, _stitchederror.getReactStitchedError)(cause);
// In development mode, pass along the component stack to the error
if (process.env.NODE_ENV === 'development' && errorInfo.componentStack) {
;
stitchedError._componentStack = errorInfo.componentStack;
}
// Skip certain custom errors which are not expected to be reported on client
if ((0, _bailouttocsr.isBailoutToCSRError)(cause)) return;
(0, _reportglobalerror.reportGlobalError)(stitchedError);
};
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=shared.js.map