Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added filtering for expected Turnstile errors in Sentry #2573

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion concordia/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,18 @@ <h2 class="h3 font-weight-normal text-center text-lg-left">Follow
integrity="sha384-PKOJCSVL6suo2Qz9Hs4hkrZqX7S6iLwadxXxBEa0h0ycsuoDNZCiAcHlPGHYxU6l"
crossorigin="anonymous"></script>
<script>
// Don't load Sentry if this is the "always online" version of the page,
// which is the version CloudFlare serves if the actual site is down
if (navigator.userAgent.indexOf("CloudFlare-AlwaysOnline") < 0) {
Sentry.init({
'dsn': '{{ SENTRY_FRONTEND_DSN }}',
'release': '{{ APPLICATION_VERSION }}',
'environment': '{{ CONCORDIA_ENVIRONMENT }}',
'blacklistUrls': [
/^moz-extension/
]
],
// Turnstile 300xxx and 600xxx errors indicate the user failed validation. We don't want those in Sentry
'ignoreErrors': ["[Cloudflare Turnstile] Error: 600", "[Cloudflare Turnstile] Error: 300"]
});
}
</script>
Expand Down