grpc-errors icon indicating copy to clipboard operation
grpc-errors copied to clipboard

Add examples for streaming situations

Open codedread opened this issue 5 years ago • 5 comments

Specifically, I'm looking for how to properly close a streaming RPC with an error code/status in a Node server.

See https://github.com/grpc/grpc-node/issues/287

codedread avatar Dec 23 '20 06:12 codedread

Hey. Error handling in streaming would be same as non streaming RPC calls

avinassh avatar Jun 30 '21 13:06 avinassh

@avinassh how exactly? you can't just call.write() since it's typed and it will throw if you try to send anything else except the proper message.

long1eu avatar Oct 14 '21 13:10 long1eu

found it, but it's absolutely not the same as with unary

https://github.com/grpc/grpc-node/issues/287#issuecomment-383218225

call.emit('error', status)

long1eu avatar Oct 14 '21 13:10 long1eu

Thanks for educating me @long1eu, I assumed it would be same since it is same across all languages.

avinassh avatar Oct 16 '21 18:10 avinassh

Thank you for your work.

long1eu avatar Oct 16 '21 18:10 long1eu