mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 08:13:52 +02:00
sentry beforeSend ignore 403 404
This commit is contained in:
@@ -41,14 +41,18 @@ export async function initSentry(app) {
|
||||
replaysSessionSampleRate: 0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
tracesSampleRate: 0.05,
|
||||
beforeSend(event) {
|
||||
if (
|
||||
event.request?.status !== 404 &&
|
||||
event.request?.status !== 403 &&
|
||||
event.request?.status !== -1
|
||||
) {
|
||||
beforeSend(event, hint) {
|
||||
const error = hint.originalException;
|
||||
if (error && typeof error.message === 'string') {
|
||||
if (
|
||||
error.message.includes('403') ||
|
||||
error.message.includes('404')
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return event;
|
||||
}
|
||||
return event;
|
||||
},
|
||||
integrations: [
|
||||
Sentry.replayIntegration({
|
||||
|
||||
Reference in New Issue
Block a user