diff --git a/client/src/onload/globalInits/initSentry.js b/client/src/onload/globalInits/initSentry.js index 58791eabfb79..48fc7e6d77dd 100644 --- a/client/src/onload/globalInits/initSentry.js +++ b/client/src/onload/globalInits/initSentry.js @@ -17,6 +17,14 @@ export const initSentry = (galaxy, config) => { Sentry.init({ dsn: sentry_dsn_public, release: release, + beforeSend(event, hint) { + const error = hint.originalException; + if (["AdminRequired", "RegisteredUserRequired"].includes(error?.name)) { + // ignore these error events + return null; + } + return event; + }, }); if (email) { Sentry.configureScope((scope) => {