Files
klz-cables.com/.pnpm-store/v10/files/e4/daa9a9e4f286f0d1d5b7f695dd3bd77a35881e26f1a432b150afcdfaba30d7d613feb6201afa67114c02f82353e415431bec3cc50db0118d028aab5c0e7367
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

42 lines
1.6 KiB
Plaintext

import { captureException } from '@sentry/browser';
import { ErrorInfo } from 'react';
/**
* See if React major version is 17+ by parsing version string.
*/
export declare function isAtLeastReact17(reactVersion: string): boolean;
/**
* Recurse through `error.cause` chain to set cause on an error.
*/
export declare function setCause(error: Error & {
cause?: Error;
}, cause: Error): void;
/**
* Captures an error that was thrown by a React ErrorBoundary or React root.
*
* @param error The error to capture.
* @param errorInfo The errorInfo provided by React.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
export declare function captureReactException(error: any, { componentStack }: ErrorInfo, hint?: Parameters<typeof captureException>[1]): string;
/**
* Creates an error handler that can be used with the `onCaughtError`, `onUncaughtError`,
* and `onRecoverableError` options in `createRoot` and `hydrateRoot` React DOM methods.
*
* @param callback An optional callback that will be called after the error is captured.
* Use this to add custom handling for errors.
*
* @example
*
* ```JavaScript
* const root = createRoot(container, {
* onCaughtError: Sentry.reactErrorHandler(),
* onUncaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
* console.warn('Caught error', error, errorInfo.componentStack);
* });
* });
* ```
*/
export declare function reactErrorHandler(callback?: (error: any, errorInfo: ErrorInfo, eventId: string) => void): (error: any, errorInfo: ErrorInfo) => void;
//# sourceMappingURL=error.d.ts.map