Both 'error' and 'end' events emitted for a server-stream call
Open
package: @grpc/grpc-js
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 716
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 10
Description
### Problem description
I'm using **node.js as client** and **python as server**, and make a **server-side streaming** call.
When I raise an Error in the server side handler, the 'error' event emitted and then the 'end' event is emitted too.
But only one of the 'error' or 'end' should be emitted according to the document:
https://grpc.io/docs/languages/node/basics/#streaming-rpcs
``` js
stream = client.serverStreamCall(msg)
stream.on('error', (err) => {
console.log('error')
}
stream.on('data', data => {})
stream.on('end', ()={
console.log('end')
}
```
I can see both 'error' and 'end' handlers are called.
----------
Node: v16.14.2
grpc-js: 1.8.11
Contributor guide
Assessment
This issue has not been assessed yet.