@sentry/nextjs
Version:
Official Sentry SDK for Next.js
29 lines (25 loc) • 1.21 kB
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const nextNavigationErrorUtils = require('../nextNavigationErrorUtils.js');
const dropReactControlFlowErrorsEventProcessor = Object.assign(
((event, hint) => {
if (event.type !== void 0) {
return event;
}
const originalException = hint.originalException;
const isPostponeError = typeof originalException === "object" && originalException !== null && "$$typeof" in originalException && originalException.$$typeof === /* @__PURE__ */ Symbol.for("react.postpone");
if (isPostponeError) {
return null;
}
if (nextNavigationErrorUtils.isPrerenderControlFlowError(originalException)) {
return null;
}
const exceptionMessage = event.exception?.values?.[0]?.value;
if (exceptionMessage?.includes("Suspense Exception: This is not a real error!") || exceptionMessage?.includes("Suspense Exception: This is not a real error, and should not leak")) {
return null;
}
return event;
}),
{ id: "DropReactControlFlowErrors" }
);
exports.dropReactControlFlowErrorsEventProcessor = dropReactControlFlowErrorsEventProcessor;
//# sourceMappingURL=dropReactControlFlowErrors.js.map