def handle_pydantic_validation_errors(func):
    """
    Decorator to handle Pydantic validation errors with friendly messages.
    """

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except ValidationError as e:
            friendly_error = convert_pydantic_exception_to_readable(e)
            raise ValueError(f"Validation failed: {friendly_error}") from e

    return wrapper

    Decorator to handle Pydantic validation errors with friendly messages.
    
ai/core/src/unitycatalog/ai/core/utils/pydantic_utils.py