From 35b44ee75596dc90a95c8b2ef21b45278c13f2eb Mon Sep 17 00:00:00 2001 From: "sentry-autofix-experimental[bot]" <157164994+sentry-autofix-experimental[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:11:23 +0000 Subject: [PATCH] Ensure that the `value` field in the `exception` data is always a valid string before passing it to `ExceptionDetails.model_validate`. --- src/seer/automation/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/seer/automation/models.py b/src/seer/automation/models.py index 1b273ea55..f513bff09 100644 --- a/src/seer/automation/models.py +++ b/src/seer/automation/models.py @@ -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", []):