heartbeat-monitor/node_modules/next/dist/esm/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

20 lines
1.0 KiB
JavaScript

// This module can be shared between both pages router and app router
import { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr';
import { reportGlobalError } from './report-global-error';
import { getReactStitchedError } from '../components/react-dev-overlay/internal/helpers/stitched-error';
import isError from '../../lib/is-error';
export const onRecoverableError = (error, errorInfo)=>{
// x-ref: https://github.com/facebook/react/pull/28736
const cause = isError(error) && 'cause' in error ? error.cause : error;
const 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 (isBailoutToCSRError(cause)) return;
reportGlobalError(stitchedError);
};
//# sourceMappingURL=shared.js.map