Skip to content

Commit

Permalink
Merge pull request #1191 from imbhaskarn/log-error-in-dev
Browse files Browse the repository at this point in the history
check for log in local env
  • Loading branch information
hugotiburtino authored Dec 9, 2023
2 parents 140699b + 03cfc5e commit 7ab1326
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/server/src/internals/error-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export function assertAll(
}

export function captureErrorEvent(event: ErrorEvent) {
if (process.env.ENVIRONMENT === 'local') {
// eslint-disable-next-line no-console
console.error(event.error)
}

Sentry.captureException(event.error, (scope) => {
if (event.location) {
if (!event.error.message.startsWith(event.location)) {
Expand Down

0 comments on commit 7ab1326

Please sign in to comment.