Features: 1) Add billiard.exceptions.WorkerLostError to handled exceptions in Sentry configuration;
Fixes: 1) Remove conditional `DEBUG` block that redundantly extended ignored errors at runtime; Extra: 1) Add comments clarifying handled exceptions; 2) Cleanup unused `DEBUG` logic for error handling.
This commit is contained in:
parent
b0aa8e0906
commit
d419d9c72e
1 changed files with 2 additions and 9 deletions
|
|
@ -284,7 +284,8 @@ if getenv("SENTRY_DSN"):
|
|||
"django.core.exceptions.PermissionDenied",
|
||||
"django.core.exceptions.BadRequest",
|
||||
"django.db.utils.OperationalError",
|
||||
"billiard.exceptions.SoftTimeLimitExceeded",
|
||||
"billiard.exceptions.SoftTimeLimitExceeded", # This is a handled exception
|
||||
"billiard.exceptions.WorkerLostError", # This is a handled exception
|
||||
"core.models.Attribute.DoesNotExist",
|
||||
"core.models.AttributeGroup.DoesNotExist",
|
||||
"core.models.AttributeValue.DoesNotExist",
|
||||
|
|
@ -296,14 +297,6 @@ if getenv("SENTRY_DSN"):
|
|||
"blog.models.Post.DoesNotExist",
|
||||
]
|
||||
|
||||
if DEBUG:
|
||||
ignore_errors.extend(
|
||||
[
|
||||
"billiard.exceptions.WorkerLostError",
|
||||
"billiard.exceptions.TimeLimitExceeded",
|
||||
]
|
||||
)
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn=getenv("SENTRY_DSN"),
|
||||
traces_sample_rate=1.0 if DEBUG else 0.2,
|
||||
|
|
|
|||
Loading…
Reference in a new issue