Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

sentry: Provide more clarity around unsupported platforms.

Tim Abbott54604257e014
diff --git a/zerver/webhooks/sentry/doc.md b/zerver/webhooks/sentry/doc.md
index 374163d2986..55303d84c0d 100644
--- a/zerver/webhooks/sentry/doc.md
+++ b/zerver/webhooks/sentry/doc.md
@@ -1,5 +1,9 @@
Get Zulip notifications for the issues in your Sentry projects!
+This integration supports Sentry's Node, Python, and Go
+[platforms](https://sentry.io/platforms/). [Contact
+us](/help/contact-support) if a platform you care about is missing.
+
1. {!create-stream.md!}
2. {!create-bot-construct-url-indented.md!}
diff --git a/zerver/webhooks/sentry/view.py b/zerver/webhooks/sentry/view.py
index 85facd90e63..7b4f91d6f00 100644
--- a/zerver/webhooks/sentry/view.py
+++ b/zerver/webhooks/sentry/view.py
@@ -66,7 +66,6 @@ Issue **{title}** was ignored by **{actor}**.
platforms_map = {
"go": "go",
"node": "javascript",
- "javascript": "javascript",
"python": "python3",
} # We can expand this as and when users use this integration with different platforms.
@@ -102,7 +101,10 @@ def handle_event_payload(event: Dict[str, Any]) -> Tuple[str, str]:
# (in the Python Sentry SDK) or something similar.
filename = event["metadata"]["filename"]
- platform = platforms_map[event["platform"]]
+ platform_name = event["platform"]
+ platform = platforms_map.get(platform_name)
+ if platform is None: # nocoverage
+ raise UnexpectedWebhookEventType("Sentry", f"platform {platform_name}")
stacktrace = None
for value in event["exception"]["values"]: