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.
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
[x] serializer_test.rb
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing tests pass locally with my changes
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: