diff --git a/samtranslator/model/__init__.py b/samtranslator/model/__init__.py index e47131793..b7157973e 100644 --- a/samtranslator/model/__init__.py +++ b/samtranslator/model/__init__.py @@ -350,6 +350,10 @@ def validate_properties_and_return_model(self, cls: Type[RT]) -> RT: with suppress(KeyError): error_properties = ".".join(str(x) for x in e.errors()[0]["loc"]) raise InvalidResourceException(self.logical_id, f"Property '{error_properties}' is invalid.") from e + except AttributeError as e: + raise InvalidResourceException( + self.logical_id, "Module 'pydantic.v1' has no attribute 'error_wrappers'" + ) from e def validate_properties(self) -> None: """Validates that the required properties for this Resource have been populated, and that all properties have