From 1ae27a6b77a9ab0249e047807393d9109e1d23ca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 22:01:12 +1100 Subject: [PATCH] Ignore sentry for TemplateSyntaxError (#9239) (#9241) - Getting flodded with reports of users misapplied template filters (cherry picked from commit 017d96f64ebdef18dc6e11647f9aba93e7dddf90) Co-authored-by: Oliver --- src/backend/InvenTree/InvenTree/sentry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/InvenTree/InvenTree/sentry.py b/src/backend/InvenTree/InvenTree/sentry.py index a6e3b78d32..b73c5e77f5 100644 --- a/src/backend/InvenTree/InvenTree/sentry.py +++ b/src/backend/InvenTree/InvenTree/sentry.py @@ -5,6 +5,7 @@ import logging from django.conf import settings from django.core.exceptions import ValidationError from django.http import Http404 +from django.template.exceptions import TemplateSyntaxError import rest_framework.exceptions import sentry_sdk @@ -29,6 +30,7 @@ def sentry_ignore_errors(): return [ Http404, MissingRate, + TemplateSyntaxError, ValidationError, rest_framework.exceptions.AuthenticationFailed, rest_framework.exceptions.NotAuthenticated,