diff --git a/src/sentry/integrations/slack/unfurl/discover.py b/src/sentry/integrations/slack/unfurl/discover.py index 6ebbb0a2421e9f..e716ea78dae3cc 100644 --- a/src/sentry/integrations/slack/unfurl/discover.py +++ b/src/sentry/integrations/slack/unfurl/discover.py @@ -95,6 +95,7 @@ def unfurl_discover( if "daily" in display_mode: params.setlist("interval", ["1d"]) + if "top5" in display_mode: if features.has("organizations:discover-top-events", org): params.setlist( @@ -104,6 +105,10 @@ def unfurl_discover( ) else: params.setlist("topEvents", [f"{TOP_N}"]) + else: + # topEvents param persists in the URL in some cases, we want to discard + # it if it's not a top n display type. + params.pop("topEvents", None) try: resp = client.get(