Skip to content

Commit

Permalink
conditional sentry exception handling
Browse files Browse the repository at this point in the history
clients ought to have the option to use whichever exception handler they want, not only sentry. by default, the apps that are set up by softserv will use sentry however. this change allows the app to still build whether the sentry values in .env.local are set or not.
whether that means the app will use something other than sentry, or the sentry project has not been set up yet
  • Loading branch information
alishaevn committed Aug 22, 2023
1 parent b9b23dc commit 399e51c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
const { withSentryConfig } = require('@sentry/nextjs')
// This guard clause allows the app to still build in the event another exception handler will be used,
// or the sentry project hasn't been set up yet
if (!process.env.SENTRY_DSN && !process.env.NEXT_PUBLIC_SENTRY_DSN) return

/** @type {import('next').NextConfig} */
const moduleExports = {
Expand Down

0 comments on commit 399e51c

Please sign in to comment.