mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
webhooks: Handle explicit null context_line in Sentry.
This commit is contained in:
committed by
Tim Abbott
parent
8fb001ce92
commit
e6eaa9a7f6
@@ -129,11 +129,15 @@ def handle_event_payload(event: Dict[str, Any]) -> Tuple[str, str]:
|
||||
exception_frame = frame
|
||||
break
|
||||
|
||||
if exception_frame and "context_line" in exception_frame:
|
||||
if (
|
||||
exception_frame
|
||||
and "context_line" in exception_frame
|
||||
and exception_frame["context_line"] is not None
|
||||
):
|
||||
pre_context = convert_lines_to_traceback_string(
|
||||
exception_frame.get("pre_context", None)
|
||||
)
|
||||
context_line = exception_frame.get("context_line", "") + "\n"
|
||||
context_line = exception_frame["context_line"] + "\n"
|
||||
post_context = convert_lines_to_traceback_string(
|
||||
exception_frame.get("post_context", None)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user