Skip to content

Commit df67430

Browse files
a-haritiLuca Forstner
andauthored
better warning message
Co-authored-by: Luca Forstner <[email protected]>
1 parent b6d3367 commit df67430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ function warnAboutMissingonRequestErrorHandler(projectDir: string): void {
459459
}
460460
if (!instrumentationPaths.some(hasOnRequestErrorHandler)) {
461461
// eslint-disable-next-line no-console
462-
console.warn(`${chalk.yellow('[@sentry/nextjs]')} Missing 'onRequestError' handler in instrumentation file.`);
462+
console.warn(`${chalk.yellow('[@sentry/nextjs]')} Could not find \`onRequestError\` hook in instrumentation file. This indicates outdated configuration of the Sentry SDK. Use \`Sentry.captureRequestError\` to instrument the \`onRequestError\` hook: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#errors-from-nested-react-server-components`);
463463
}
464464
}
465465

0 commit comments

Comments
 (0)