I don't know if I'm reading this wrong, but it doesn't look to me like the generated callbacks in the behaviour modules have the correct type specifications. For example, for a unary call the behaviour says:
but the code in grpxbox_stream:handle_unary is doing:
case [make the call] of
{ok, Response, Ctx2} ->
State1 = from_ctx(Ctx2),
send(falsoe, Response, State1);
E={grpc_error, _} ->
throw(E);
E={grpc_extended_error, _} ->
throw(E)
end.
when doesn't match a grpc_error_response. I'm using master for both grpcbox_plugin and grpcbox - should these two line up? If so, then I'm happy to do a PR to make the behaviours match the code
Thanks, you are right, something is wrong here, there was another issue with the error type specs fixed recently https://github.com/tsloughter/grpcbox/pull/79 -- so seems I need to look at all of these :)
I don't know if I'm reading this wrong, but it doesn't look to me like the generated callbacks in the behaviour modules have the correct type specifications. For example, for a unary call the behaviour says:
where
grpc_error_response
is defined as:but the code in grpxbox_stream:handle_unary is doing:
when doesn't match a grpc_error_response. I'm using master for both grpcbox_plugin and grpcbox - should these two line up? If so, then I'm happy to do a PR to make the behaviours match the code