exceptions: Guard validation error conversion with message_dict.
exceptions: Guard validation error conversion with message_dict.

Iterating over ValidatorError does not necessarily return a tuple. This
uses the `message_dict` property on `ValidationError` instead to make
sure that we always get a `dict` (it otherwise raises an `AttributeError`
when the `dict` is not available).

Signed-off-by: Zixuan James Li <74923aee05c23ca90566381b5d6b0cd9451b6054@gmail.com>

andersk/zulip,zulip/zulip,rht/zulip,zulip/zulip,rht/zulip,rht/zulip,zulip/zulip,zulip/zulip,zulip/zulip,zulip/zulip,andersk/zulip,andersk/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,andersk/zulip,rht/zulip,andersk/zulip,rht/zulip,rht/zulip