Fix error handling for streaming RPCs#116
Fix error handling for streaming RPCs#116JonathanArns wants to merge 1 commit intotsloughter:mainfrom
Conversation
Fixes an issue where grpcbox ignores errors that are returned from the callback function of a streaming RPC. This happened both on RPCs with streaming and non-streaming output, though the behaviour was different: For non-streaming output, grpcbox always returned a generic error, generated in `grpcbox_stream.erl` line 425 (on this commit). For streaming output, errors were completely ignored and the stream was closed without an error indication to the client. Also fixes a small issue where grpcbox passed incorrect ServerInfo to streaming interceptors for RPCs with only streaming output.
|
@JonathanArns sorry for not getting to this sooner. Is there a decent way to add a test for this by chance? |
|
Hi, yes I can come up with a test. |
|
I just realized you are at Ericsson. Funny enough I just emailed Rickard Green to check if grpcbox was still in use :) |
|
And I would love additional tests, thanks! |
|
Hi, sorry for the long turn around on my side now! It turns out the test suites don't build anymore because of #118 and fixing that here does not seem appropriate, so that seems like it should happen first. Any thoughts or feelings? |
|
Yea, I'll handle that. |
Fixes an issue where grpcbox ignores errors that are returned from the callback function of a streaming RPC. This happened both on RPCs with streaming and non-streaming output, though the behaviour was different: For non-streaming output, grpcbox always returned a generic error, generated in
grpcbox_stream.erlline 425 (on this commit).For streaming output, errors were completely ignored and the stream was closed without an error indication to the client.
Also fixes a small issue where grpcbox passed incorrect ServerInfo to streaming interceptors for RPCs with only streaming output.