Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling of "joda-money" MoneyDeserializer, CurrencyUnitDeserializer #8

Closed
cowtowncoder opened this issue Jan 19, 2021 · 0 comments
Labels
joda-money Issue related joda-money datatype module
Milestone

Comments

@cowtowncoder
Copy link
Member

As of 2.12, no validation is done for case of missing monetary amount or unit, and failure propagates as NPE -- unit test even verifies that. But that seems like a pretty bad user experience. Instead, let's validate this properly and indicate using DeserializationContext.reportInputMismatch().
Probably also makes sense to check handling of currency unit as well; seems better to give Jackson-specific exception for unknown unit than expose library-specific one.

cowtowncoder added a commit that referenced this issue Feb 1, 2021
@cowtowncoder cowtowncoder added this to the 2.13.0 milestone Feb 1, 2021
@cowtowncoder cowtowncoder changed the title Improve error handling of "joda-money" MoneyDeserializer (and maybe currency one too) Improve error handling of "joda-money" MoneyDeserializer, CurrencyUnitDeserializer Feb 1, 2021
@cowtowncoder cowtowncoder added the joda-money Issue related joda-money datatype module label Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
joda-money Issue related joda-money datatype module
Projects
None yet
Development

No branches or pull requests

1 participant