integrations: Check for Raven SDK only on python in Sentry Integration.

Fixes part of #25778.
This commit is contained in:
Satyam Bansal
2023-05-29 16:54:15 +05:30
committed by Tim Abbott
parent 142e455d81
commit 3bdb806fba

View File

@@ -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"],