sentry: Provide more clarity around unsupported platforms.

This commit is contained in:
Tim Abbott
2020-06-16 14:04:16 -07:00
parent 4576742b2f
commit 54604257e0
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
Get Zulip notifications for the issues in your Sentry projects! 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!} 1. {!create-stream.md!}
2. {!create-bot-construct-url-indented.md!} 2. {!create-bot-construct-url-indented.md!}

View File

@@ -66,7 +66,6 @@ Issue **{title}** was ignored by **{actor}**.
platforms_map = { platforms_map = {
"go": "go", "go": "go",
"node": "javascript", "node": "javascript",
"javascript": "javascript",
"python": "python3", "python": "python3",
} # We can expand this as and when users use this integration with different platforms. } # 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. # (in the Python Sentry SDK) or something similar.
filename = event["metadata"]["filename"] 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 stacktrace = None
for value in event["exception"]["values"]: for value in event["exception"]["values"]: