-
Notifications
You must be signed in to change notification settings - Fork 524
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
Include field name in decoding errors #3866
Conversation
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
Can you give an example of an error where this would have helped? I'm wondering why we're getting these "fetch" errors at all - shouldn't JSON Schema validation have prevented them? |
@axw they are relevant basically for development. One example for instance when you get it is if you call the wrong decoder method (eg. use |
OK. So in this case it would be like the schema said something is optional, but in the code we made it required by using the wrong method. Fair enough. |
Codecov Report
@@ Coverage Diff @@
## master #3866 +/- ##
=======================================
Coverage 79.80% 79.80%
=======================================
Files 135 135
Lines 6234 6234
=======================================
Hits 4975 4975
Misses 1259 1259 |
Motivation/summary
Troubleshooting decoding errors is currently very hard because the error doesn't include the field name, and there are many call sites (and calls) that can return an error.
This adds the field name to the decoding error message.
Checklist
I have considered changes for:
How to test these changes
make test