-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Query/Form: Use serde_path_to_error
to report fields that failed to parse
#3081
Conversation
/cc @jplatte :) |
39f91b5
to
07473cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind doing the same thing for Form
and both serde_html_form
extractors in axum-extra?
Also, changelog entries
it looks like the
yeah, I'll add it to the other |
nevermind, I was looking at the too early in the morning 😂 |
serde_path_to_error
to report key that failed to parseserde_path_to_error
to report fields that failed to parse
07473cd
to
4670ca4
Compare
alright, should all be done now :) |
…t failed to parse
4670ca4
to
aee1292
Compare
aee1292
to
6102e66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Motivation
I've started using the
Query
extractor more and more over the past couple of days and noticed that its error messages don't help the user in understanding which field specifically failed to parse.Solution
This solves the problem roughly similar to our existing usage of
serde_path_to_error
in theJson
extractor. The resulting error messages change from e.g.to