Skip to content

Commit 789a200

Browse files
Rachel ChenRachel Chen
authored andcommitted
ugly check
1 parent dc0294c commit 789a200

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

snuba/web/rpc/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,7 @@ def __after_execute(self, in_msg: Tin, out_msg: Tout, error: Exception | None) -
368368
tags=self._timer.tags,
369369
)
370370
# AllocationPolicyViolations is not a request_error
371-
elif not (
372-
isinstance(error, QueryException)
373-
and error.exception_type == AllocationPolicyViolations.__name__
374-
):
371+
elif not isinstance(error.__cause__, AllocationPolicyViolations):
375372
sentry_sdk.capture_exception(error)
376373
self.metrics.increment(
377374
"request_error",

0 commit comments

Comments
 (0)