-
Notifications
You must be signed in to change notification settings - Fork 200
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
Handle unmarshalling errors better #137
Comments
This is handled by grpc-gateway, so we should implement our own error handler per: https://mycodesmells.com/post/grpc-gateway-error-handler https://grpc-ecosystem.github.io/grpc-gateway/docs/customizingyourgateway.html |
I can take a a look into this one. I'm leaning towards starting with idea 1, if that sounds like a good plan to you. |
I started taking a look into this over the weekend. I took a look at the blog post that you linked in this issue. After implementing that, this is the error that is made available to us through the custom handler: It seems like we would probably need to add some custom logic when decoding the json (https://golang.org/pkg/encoding/json/#Decoder). Is this desired, or did you have a simpler solution in mind for this? Maybe I am missing something here. |
Thanks for taking a look @aaronraff! My initial thoughts were to be able to return something like What do you think? |
I don't mind trying it out, but if there are other issues that you feel are more important, I can jump on one of those. Sounds like a cool idea for a library though! |
I think im gonna close this since it's not really critical. There's another issue that I could use your help on re the automatic 'slugifying' of flag/segment keys from the name that was added in #155. I'll create an issue for that |
It would be great if we could handle unmarshalling errors more gracefully during evaluation.
Example
Ideas
"true"
fromtrue
and 'autobox' the type into a stringThe text was updated successfully, but these errors were encountered: