Includes invalid values in thrown errors#10
Includes invalid values in thrown errors#10artem-zakharchenko wants to merge 1 commit intojshttp:masterfrom
Conversation
b0fed1b to
e05895e
Compare
|
Hello, @dougwilson. I hate to disturb you, but could you please give us an estimate if/when these changes can be merged and released? Our team awaits them with trembling. Thank you. |
|
Hi @artem-zakharchenko thank you for this pull request. Sorry I did not respond when it was opened. With validation type of errors like this, I like to follow the practice of validation errors should not reflect the user-supplied values in the error message. This can cause various issues, like if the Ideally the caller of this library should have a copy of the invalid value that can be remitted however it likes. But if having the broken up values are valuable, they can be added as properties on the thrown error object so the caller can see what the specifics are. |
These changes add invalid values into thrown error messages to be more descriptive.
We would like to have this improvement as one of our libraries returns
media-typererrors to our users. It would be great to guide users in debugging by including the actual values in the error messages.References