diff --git a/examples/with-sentry/server.js b/examples/with-sentry/server.js index a532217359f10..e99555e0fb879 100644 --- a/examples/with-sentry/server.js +++ b/examples/with-sentry/server.js @@ -27,7 +27,7 @@ function sessionCookie (req, res, next) { } const sourcemapsForSentryOnly = token => (req, res, next) => { - // In production we only want to serve source maps for sentry + // In production we only want to serve source maps for Sentry if (!dev && !!token && req.headers['x-sentry-token'] !== token) { res .status(401) @@ -38,19 +38,18 @@ const sourcemapsForSentryOnly = token => (req, res, next) => { } app.prepare().then(() => { - // The app.buildId is only available after app.prepare(), hence why we setup - // here. + // app.buildId is only available after app.prepare(), hence why we setup here const { Sentry } = require('./utils/sentry')(app.buildId) express() - // This attaches request information to sentry errors + // This attaches request information to Sentry errors .use(Sentry.Handlers.requestHandler()) .use(cookieParser()) .use(sessionCookie) .get(/\.map$/, sourcemapsForSentryOnly(process.env.SENTRY_TOKEN)) // Regular next.js request handler .use(handler) - // This handles errors if they are thrown before raching the app + // This handles errors if they are thrown before reaching the app .use(Sentry.Handlers.errorHandler()) .listen(port, err => { if (err) {