-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Field path on deserialization error #13
Comments
I don't disagree, but given the way Serde is built, I'm not really sure how to even build that path. |
Random thought for the future: Could the exception backtrace be introspected to dig out the chain of Field objects? Maybe, not sure. |
We ran across this need as well. If I look at how Serde works then it seems that this chain has been added as So that would now make it possible to provide that to the I'd be happy to provide a pull request to make that work, but I think I'd have 2 questions:
|
To your questions:
|
When error occures during deserialization the field path could be present to use in API error response.
Detailed description and context
For programmer centric experience when using deserialization as a part of API endpoint validation the resulting error
should contain a field path and basic error description and error type to be passed back to the caller, so that he can react and solve the issue.
(Or to be unified with like symfony validator and on UI level shown to fields of the form.)
Possible implementation
N/A
Your environment
The text was updated successfully, but these errors were encountered: