Skip to content

Raise structured Errors instead of JSON strings in fallback client. #395

@kramarz

Description

@kramarz

When using regular grpc client on error we get ServiceError with all metadata assigned as attributes:
https://github.com/grpc/grpc-node/blob/master/packages/grpc-js/src/call.ts#L79

In fallback client we are only getting Error with JSON string as message:
https://github.com/googleapis/gax-nodejs/blob/master/src/fallback.ts#L337

To be able to handle different errors differently it would be convenient to use similar structure i.e. to make error.code available without need of parsing message.

Metadata

Metadata

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions