Skip to content

Commit 7503a37

Browse files
authored
fix(python-filtering): update filtering example with optional return type in Python (#11790)
1 parent e998027 commit 7503a37

File tree

1 file changed

+1
-1
lines changed
  • docs/platforms/python/configuration/filtering

1 file changed

+1
-1
lines changed

docs/platforms/python/configuration/filtering/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Suppose that you wish prevent all errors of type `ZeroDivisionError` from being
3030
import sentry_sdk
3131
from sentry_sdk.types import Event, Hint
3232

33-
def my_before_send(event: Event, hint: Hint) -> Event:
33+
def my_before_send(event: Event, hint: Hint) -> Event | None:
3434
# Filter out all ZeroDivisionError events.
3535
# Note that the exception type is available in the hint,
3636
# but we should handle the case where the exception info

0 commit comments

Comments
 (0)