Skip to content

Commit d566a96

Browse files
committed
reporting errors to sentry
turns out that hardcoding the SENTRY_DSN was the necessary change. idk why though. the sentry docs, referenced below, mention using the env variable. https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/#what-the-dsn-does
1 parent 3d0b6ca commit d566a96

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

sentry.client.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as Sentry from '@sentry/nextjs'
66

77
Sentry.init({
8-
dsn: process.env.SENTRY_DSN,
8+
dsn: 'https://[email protected]/4504810271408128',
99
// Adjust this value in production, or use tracesSampler for greater control
1010
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
1111
tracesSampleRate: 1.0,

sentry.edge.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as Sentry from '@sentry/nextjs'
66

77
Sentry.init({
8-
dsn: process.env.SENTRY_DSN,
8+
dsn: 'https://[email protected]/4504810271408128',
99
// Adjust this value in production, or use tracesSampler for greater control
1010
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
1111
tracesSampleRate: 1.0,

sentry.server.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as Sentry from '@sentry/nextjs'
66

77
Sentry.init({
8-
dsn: process.env.SENTRY_DSN,
8+
dsn: 'https://[email protected]/4504810271408128',
99
// Adjust this value in production, or use tracesSampler for greater control
1010
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
1111
tracesSampleRate: 1.0,

utils/api/base.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ export const fetcher = (url, token) => {
1010
return api.get(url, { headers: `Bearer 1234` })
1111
.then(res => res.data)
1212
.catch(error => {
13-
console.log({ error })
14-
Sentry.captureException(new Error(error))
15-
// Sentry.captureEvent({
16-
// message: error,
17-
// stacktrace: error.stacktrace,
18-
// name: error.name,
19-
// })
13+
Sentry.captureException(error)
2014
})
2115
}
2216

0 commit comments

Comments
 (0)