[CDF-25725] Avoid printing empty error messages (#2064)

# Description

In #1900 we decided to suppress pydantic validation warnings when
metadata dicts were in use. However, warnings (with empty error lists)
were added to warninglists.

Before: 
<img width="1296" height="456" alt="Screenshot 2025-10-10 at 12 06 55"
src="https://github.com/user-attachments/assets/0aea8fd8-7967-4f09-8682-dbd8d489b6f9"
/>

After:
<img width="1296" height="456" alt="Screenshot 2025-10-10 at 12 25 03"
src="https://github.com/user-attachments/assets/c30c89ac-f348-4095-9caf-49deadd942ab"
/>


## Changelog

- [x] Patch
- [ ] Skip

## cdf

### Fixed

- Empty warnings are no longer being displayed, for example when
metadata dictionary warnings are suppressed.

## templates

No changes.
