connect-go
connect-go copied to clipboard
Provide function to write RPC errors from HTTP middleware
Is your feature request related to a problem? Please describe.
Even though Connect handlers work with net/http middleware, it's often necessary to re-implement existing HTTP middleware as Connect interceptors so that clients get nicely-annotated errors. This is a little silly.
Describe the solution you'd like
It'd be nice for Connect to include a function that HTTP middleware can use to encode Connect errors. func WriteError(http.ResponseWriter, *http.Request, error) might work.
Describe alternatives you've considered The status quo is okay, but forces users to jump through more hoops that we'd like.
I look forward to this feature coming soon
Released in v0.5.0!