from pydantic import ValidationError

try:
    Customer.model_validate({"id": "42", "email": "a@example.com", ...}, strict=True)
except ValidationError as exc:
    # In lax mode, "42" would have silently become 42. In strict mode this
    # is now a loud failure -- exactly what you want from a service-to-service call.
    ...
