Skip to content

Commit

Permalink
web: Do not log console.error in sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Dec 22, 2024
1 parent 9b0c43e commit 3e9778d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
4 changes: 1 addition & 3 deletions web/composables/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import { tagPattern } from "~/lib/util"
import { useBrawlstarsStore } from "~/stores/brawlstars"
import { TRPCClientError } from "@trpc/client"
import { useI18n } from "vue-i18n"
import { useSentry, useValidate } from "./compat"
import { useValidate } from "./compat"
import { computed, Ref } from 'vue'

export async function useLoadAndValidatePlayer(urlPrefix: string) {
const i18n = useI18n()
const store = useBrawlstarsStore()
const sentry = useSentry()

const validatePromise = useValidate(async ({ params, redirect, error }) => {
const tag = (params.tag as string).toUpperCase()
Expand Down Expand Up @@ -46,7 +45,6 @@ export async function useLoadAndValidatePlayer(urlPrefix: string) {
}

console.error(err)
sentry.captureException(err)
error({ statusCode: 500, message: ' ' })
}
})
Expand Down
4 changes: 0 additions & 4 deletions web/renderer/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Router } from "vue-router"
import * as Sentry from '@sentry/vue'
import {
httpClientIntegration,
captureConsoleIntegration,
extraErrorDataIntegration,
reportingObserverIntegration,
rewriteFramesIntegration,
Expand All @@ -21,9 +20,6 @@ export function initSentry(dsn: string, app: App<Element>, router?: Router) {
extraErrorDataIntegration(),
reportingObserverIntegration(),
rewriteFramesIntegration(),
captureConsoleIntegration({
levels: ['error', 'assert']
}),
httpClientIntegration(),
Sentry.browserTracingIntegration({
router,
Expand Down
4 changes: 0 additions & 4 deletions web/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { PageContext } from '~/renderer/types'
import * as Sentry from '@sentry/node'
import {
dedupeIntegration,
captureConsoleIntegration,
extraErrorDataIntegration,
rewriteFramesIntegration,
} from '@sentry/browser'
Expand All @@ -28,9 +27,6 @@ async function startServer() {
dedupeIntegration(),
extraErrorDataIntegration(),
rewriteFramesIntegration(),
captureConsoleIntegration({
levels: ['error', 'assert'],
}),
],
ignoreErrors: [
// ignore errors that are not actionable
Expand Down

0 comments on commit 3e9778d

Please sign in to comment.