fix(types): Serialize BadRequest::FieldViolation reason and localized_message#2461
fix(types): Serialize BadRequest::FieldViolation reason and localized_message#2461MathieuTricoire wants to merge 4 commits intohyperium:v0.14.xfrom
BadRequest::FieldViolation reason and localized_message#2461Conversation
| } | ||
|
|
||
| #[test] | ||
| fn gen_bad_request_with_verbose_field_violation() { |
There was a problem hiding this comment.
I'd recommend either merging the business logic into the original test or creating an incremental fine grained test that tests just the new business logic that has been added in this change.
There was a problem hiding this comment.
Thanks @sauravzg for the review! I've merged the new coverage into the original test as suggested. Let me know if this looks good to you.
|
Hi! Just checking in, it looks like a new release went out without the fix. Any chance it could be merged soon? |
|
@sauravzg Sorry to ask again but is there any chance it could be merged? |
|
@LucioFranco LGTM from my side. Please see if this looks okay and merge. |
0d75d59 to
c3f0aa0
Compare
|
@LucioFranco @sauravzg I rebased on top of the latest main, would appreciate a fresh approval if needed (no changes from last approval) 🙏 |
Motivation
fix #2460
Fields
reasonandlocalized_messagefromBadRequest::FieldViolationare not serialized into the underlying protobuf message and therefore never make it onto the wire.Solution
Fix the conversion from
FieldViolationto the prost-generatedpb::bad_request::FieldViolationby explicitly forwarding both thereasonandlocalized_messagefields instead of leaving them at their default values.A new test is added to ensure that behavior.