Closed skolodyazhnyy closed 3 years ago
This sounds interesting. Twirp was designed initially to be familiar to gRPC users, but not to be fully compatible. Most users don't need to bridge Twirp and gRPC. I would be curious about what type of issues you find. Please, provide more details about how would you envision converting errors to status codes, is that a client adapter? a service middleware?
~I believe we'd made a server hook to deal with it or something.~
~I no longer work at Verloop. Let me ask around and see if we can remember the solution we came up for this.~
Now I remember!
The initial plan was to make hooks, but hooks didn't support overwriting errors.
We bundled switch to twirp with some much needed clean up of our services, API definitions and switched to a standardised scaffolding server code.
Heads up: If you use grpc metadata, you'll need to translate them as well.
Check this https://github.com/twitchtv/twirp/issues/161
Maybe the proposal for Twirp middleware/interceptors would help build an adapter for gRPC? #265
This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days
Hey,
I'm trying out twirp to compliment my GRPC server. Unfortunately, all my GRPC errors are showing up as internal in twirp. Is there chance GRPC errors can be supported by Twirp error handler?
Twirp Server interface is compatible with interface generated for GRPC server, which is great. It takes around 5 seconds to create twirp server if you have GRPC server. But errors are not compatible at all, so now I have to re-write my server implementation or wrap it into some adapters 😓