sentry: Properly stringify a possibly-None result.

This commit is contained in:
Matt Keller 2022-09-06 19:22:18 +00:00 committed by Tim Abbott
parent 01d659b672
commit e1023f45cf
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ def handle_event_payload(event: Dict[str, Any]) -> Tuple[str, str]:
pre_context = convert_lines_to_traceback_string(
exception_frame.get("pre_context", None)
)
context_line = exception_frame["context_line"] + "\n"
context_line = exception_frame.get("context_line", "") + "\n"
post_context = convert_lines_to_traceback_string(
exception_frame.get("post_context", None)
)