mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
integrations: Check for Raven SDK only on python in Sentry Integration.
Fixes part of #25778.
This commit is contained in:
committed by
Tim Abbott
parent
142e455d81
commit
3bdb806fba
@@ -94,9 +94,6 @@ def convert_lines_to_traceback_string(lines: Optional[List[str]]) -> str:
|
|||||||
|
|
||||||
def handle_event_payload(event: Dict[str, Any]) -> Tuple[str, str]:
|
def handle_event_payload(event: Dict[str, Any]) -> Tuple[str, str]:
|
||||||
"""Handle either an exception type event or a message type event payload."""
|
"""Handle either an exception type event or a message type event payload."""
|
||||||
# We shouldn't support the officially deprecated Raven series of SDKs.
|
|
||||||
if int(event["version"]) < 7:
|
|
||||||
raise UnsupportedWebhookEventTypeError("Raven SDK")
|
|
||||||
|
|
||||||
subject = event["title"]
|
subject = event["title"]
|
||||||
platform_name = event["platform"]
|
platform_name = event["platform"]
|
||||||
@@ -104,6 +101,10 @@ def handle_event_payload(event: Dict[str, Any]) -> Tuple[str, str]:
|
|||||||
if syntax_highlight_as == "": # nocoverage
|
if syntax_highlight_as == "": # nocoverage
|
||||||
logging.info("Unknown Sentry platform: %s", platform_name)
|
logging.info("Unknown Sentry platform: %s", platform_name)
|
||||||
|
|
||||||
|
# We shouldn't support the officially deprecated Raven series of
|
||||||
|
# Python SDKs.
|
||||||
|
if platform_name == "python" and int(event["version"]) < 7:
|
||||||
|
raise UnsupportedWebhookEventTypeError("Raven SDK")
|
||||||
context = {
|
context = {
|
||||||
"title": subject,
|
"title": subject,
|
||||||
"level": event["level"],
|
"level": event["level"],
|
||||||
|
|||||||
Reference in New Issue
Block a user