From 03f8a9031e4124629f443817d94a7cb2199846dc Mon Sep 17 00:00:00 2001 From: Lujeni Date: Tue, 12 Nov 2024 14:53:11 +0100 Subject: [PATCH] fix(python-filtering): update filtering example with optional return type in Python --- docs/platforms/python/configuration/filtering/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/python/configuration/filtering/index.mdx b/docs/platforms/python/configuration/filtering/index.mdx index bc86e00577009..f11d1b2b94ce7 100644 --- a/docs/platforms/python/configuration/filtering/index.mdx +++ b/docs/platforms/python/configuration/filtering/index.mdx @@ -30,7 +30,7 @@ Suppose that you wish prevent all errors of type `ZeroDivisionError` from being import sentry_sdk from sentry_sdk.types import Event, Hint -def my_before_send(event: Event, hint: Hint) -> Event: +def my_before_send(event: Event, hint: Hint) -> Event | None: # Filter out all ZeroDivisionError events. # Note that the exception type is available in the hint, # but we should handle the case where the exception info