Fix sentry tracked issues
This commit is contained in:
8
client/plugins/sentry.js
vendored
8
client/plugins/sentry.js
vendored
@@ -54,6 +54,14 @@ export default defineNuxtPlugin({
|
||||
replaysOnErrorSampleRate: config.public.SENTRY_ERROR_REPLAY_SAMPLE_RATE,
|
||||
|
||||
beforeSend(event) {
|
||||
if (event.exception.values.length) {
|
||||
// Don't send validation exceptions to Sentry
|
||||
if (event.exception.values[0].type === 'FetchError' &&
|
||||
event.exception.values[0].value.includes('422')
|
||||
) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return event;
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user