grpc / grpc-node

gRPC for Node.js
https://grpc.io
Apache License 2.0
4.44k stars 640 forks source link

Richer error model: status #1338

Open keyvhinng opened 4 years ago

keyvhinng commented 4 years ago

According to gRPC's Error Handling guide:

This richer error model is already supported in the C++, Go, Java, Python, and Ruby libraries, and at least the grpc-web and Node.js libraries have open issues requesting it

I haven't found any reference or open issue with information regarding richer error model support for Node. Is it already implemented or is there any plan to support it in the near future?

murgatroid99 commented 4 years ago

Just today I tried out https://www.npmjs.com/package/grpc-error-status and it seemed to work pretty well. It's not an official solution but it may help you.

giowe commented 4 years ago

+1

nicofuccella commented 4 years ago

+1

keyvhinng commented 4 years ago

Thanks, @murgatroid99 for the information. If I'm not wrong, the grpc-error-status library is to consume error status on the client-side. I'm looking to send richer error model status from Node (server) to clients. If there is no progress on that, I'm willing to collaborate to make it happen

murgatroid99 commented 4 years ago

I think you're right about what that library does, and there has not been any progress on a server-side counterpart. I would generally prefer for this to be in a separate library, so that the main library's API does not handle protobuf objects.