MoskitoHero / barley

Barley is a fast and efficient ActiveModel serializer
MIT License
80 stars 3 forks source link

Raise a Barley::InvalidAttributeError on type errors #9

Closed MoskitoHero closed 4 months ago

MoskitoHero commented 4 months ago

Description

Up to now, type errors raised by dry-types within a Barley serializer were not very clear and not easy to track.

This MR introduces a new Barley::InvalidAttributeError to handle type errors in attributes with the key name, the expected type and the actual type found.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Checklist: