You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Now, according to the proto3 spec, a particular oneof may remain unset. To check this (f.e. in Python) you'd call my_msg.WhichOneof('b') - it can return None, "c" or "d".
With this library you cannot handle this very real possibility, instead you get a runtime error:
status = StatusCode.INVALID_ARGUMENT
details = "done-error: WireTypeError "unknown type in an union""
debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:21599 {grpc_message:"done-error: WireTypeError \"unknown type in an union\"", grpc_status:3, created_time:"2024-03-18T13:36:28.721508+02:00"}"
Currently it is not possible to declare the type of the b field to be Maybe MyMsg_b.
The only workaround (as I described in my previous issue #339) is to wrap the oneof in yet another message.
Now I'm pretty sure this ought to be fixed.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following proto:
corresponds to the following Haskell code:
Now, according to the proto3 spec, a particular
oneof
may remain unset. To check this (f.e. in Python) you'd callmy_msg.WhichOneof('b')
- it can returnNone
,"c"
or"d"
.With this library you cannot handle this very real possibility, instead you get a runtime error:
Currently it is not possible to declare the type of the
b
field to beMaybe MyMsg_b
.The only workaround (as I described in my previous issue #339) is to wrap the
oneof
in yet another message.Now I'm pretty sure this ought to be fixed.
The text was updated successfully, but these errors were encountered: