Skip to content

Commit baae950

Browse files
fix(arq): Never capture control flow exceptions (#6507)
Return early when `scope.transaction` is `None`, matching the existing behavior when there is a transaction on the scope.
1 parent 3d126ff commit baae950

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sentry_sdk/integrations/arq.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ def _capture_exception(exc_info: "ExcInfo") -> None:
118118

119119
scope.transaction.set_status(SPANSTATUS.INTERNAL_ERROR)
120120

121+
if exc_info[0] in ARQ_CONTROL_FLOW_EXCEPTIONS:
122+
return
123+
121124
event, hint = event_from_exception(
122125
exc_info,
123126
client_options=sentry_sdk.get_client().options,

0 commit comments

Comments
 (0)