http4s / http4s-grpc

https://http4s.github.io/http4s-grpc/
MIT License
40 stars 5 forks source link

Ability to generate status codes from user code #135

Open moleike opened 1 month ago

moleike commented 1 month ago

As it stands now, we have no way to propagate/generate gRPC statuses from a server application. Whenever the application errors, the server encodes it into an UNKNOWN status. The codes are documented here: https://github.com/grpc/grpc.io/blob/main/content/en/docs/guides/status-codes.md

Jasper-M commented 1 month ago

I think adding a StatusRuntimeException like in grpc-java might make sense. And seems easy to implement as well.

hamnis commented 1 month ago

this sounds reasonable, would you be willing to add a PR for that?

moleike commented 1 month ago

Sure thing, I'll give it a stab soon.