From 043238dfb4781834391d646d0f822c50c725177a Mon Sep 17 00:00:00 2001 From: Rohan Agarwal Date: Tue, 3 Sep 2024 09:09:12 -0700 Subject: [PATCH] Make exception type optional --- src/seer/automation/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/seer/automation/models.py b/src/seer/automation/models.py index 877db70da..a484dac82 100644 --- a/src/seer/automation/models.py +++ b/src/seer/automation/models.py @@ -274,7 +274,7 @@ class SentryEventData(TypedDict): class ExceptionDetails(BaseModel): - type: str + type: Optional[str] = "" value: Optional[str] = "" stacktrace: Optional[Stacktrace] = None @@ -380,13 +380,13 @@ def format_exceptions(self): return "\n".join( textwrap.dedent( """\ - + {stacktrace} """ ).format( i=i, - exception_type=exception.type, - exception_message=exception.value, + exception_type=f' type="{exception.type}"' if exception.type else "", + exception_message=f' message="{exception.value}"' if exception.value else "", stacktrace=( exception.stacktrace.to_str(in_app_only=True) if exception.stacktrace else "" ),