From 94f15720171fe8df12e9565c4dfd77cb1f83c94d Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 6 Dec 2024 10:13:09 +0000 Subject: [PATCH] feat(nextjs)!: Remove `experimental_captureRequestError` --- packages/nextjs/src/common/captureRequestError.ts | 8 -------- packages/nextjs/src/common/index.ts | 3 +-- packages/nextjs/src/index.types.ts | 3 +-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/nextjs/src/common/captureRequestError.ts b/packages/nextjs/src/common/captureRequestError.ts index 6de33ad11a8e..26fdaab4953b 100644 --- a/packages/nextjs/src/common/captureRequestError.ts +++ b/packages/nextjs/src/common/captureRequestError.ts @@ -41,11 +41,3 @@ export function captureRequestError(error: unknown, request: RequestInfo, errorC }); }); } - -/** - * Reports errors passed to the the Next.js `onRequestError` instrumentation hook. - * - * @deprecated Use `captureRequestError` instead. - */ -// TODO(v9): Remove this export -export const experimental_captureRequestError = captureRequestError; diff --git a/packages/nextjs/src/common/index.ts b/packages/nextjs/src/common/index.ts index 7740c35c016c..b9a652522349 100644 --- a/packages/nextjs/src/common/index.ts +++ b/packages/nextjs/src/common/index.ts @@ -11,5 +11,4 @@ export { wrapMiddlewareWithSentry } from './wrapMiddlewareWithSentry'; export { wrapPageComponentWithSentry } from './pages-router-instrumentation/wrapPageComponentWithSentry'; export { wrapGenerationFunctionWithSentry } from './wrapGenerationFunctionWithSentry'; export { withServerActionInstrumentation } from './withServerActionInstrumentation'; -// eslint-disable-next-line deprecation/deprecation -export { experimental_captureRequestError, captureRequestError } from './captureRequestError'; +export { captureRequestError } from './captureRequestError'; diff --git a/packages/nextjs/src/index.types.ts b/packages/nextjs/src/index.types.ts index 1b6a0e09ed85..1b965828116f 100644 --- a/packages/nextjs/src/index.types.ts +++ b/packages/nextjs/src/index.types.ts @@ -142,5 +142,4 @@ export declare function wrapApiHandlerWithSentryVercelCrons(WrappingTarget: C): C; -// eslint-disable-next-line deprecation/deprecation -export { experimental_captureRequestError, captureRequestError } from './common/captureRequestError'; +export { captureRequestError } from './common/captureRequestError';