grpc / grpc/grpc-node

grpc stream typescript type of error in `call.on('error'` is Error instead of grpc.ServiceError

Open
#2,942 1 comment 0 reactions 0 assignees View on GitHub
package: @grpc/grpc-js
Dominant language
TypeScript
Stars
4.8k
Forks
716
Avg merge
2d 3h
Merged PRs (30d)
10

Description

### Problem description
The type of the error in
```
const call = client.RequestFooStream({});
call.on('error', (error) => {}
```
is `Error`. I assume it should be `grpc.ServiceError` which is defined as `export type ServiceError = StatusObject & Error;` inside your package.

### Environment
- @grpc/grpc-js: 1.13.3
- Node v20

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.