Skip to content

Commit

Permalink
Ensure that the value field in the exception data is always a val…
Browse files Browse the repository at this point in the history
…id string before passing it to `ExceptionDetails.model_validate`.
  • Loading branch information
sentry-autofix-experimental[bot] committed Jul 15, 2024
1 parent 6d13cb6 commit 35b44ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/seer/automation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def from_event(cls, error_event: SentryEventData):
for entry in error_event.get("entries", []):
if entry.get("type") == "exception":
for exception in entry.get("data", {}).get("values", []):
if exception.get("value") is None:
exception["value"] = ""
exceptions.append(ExceptionDetails.model_validate(exception))
if entry.get("type") == "threads":
for thread in entry.get("data", {}).get("values", []):
Expand Down

0 comments on commit 35b44ee

Please sign in to comment.