Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an interceptor #5

Open
franchb opened this issue Jul 8, 2024 · 0 comments
Open

Add an interceptor #5

franchb opened this issue Jul 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@franchb
Copy link
Owner

franchb commented Jul 8, 2024

Is your feature request related to a problem? Please describe.
An easy way to convert gRPC errors to connect-go errors.

Describe the solution you'd like

The recommended way to do this is, in your own codebase (where I assume you are migrating a gRPC codebase to Connect and still have handlers and helpers that produce the gRPC error type), use an interceptor that examines all errors and translates them to Connect errors whenever it sees a gRPC error. This translation should be very straight-forward to do with the existing APIs.
connectrpc/connect-go#763

Describe alternatives you've considered
Manually handle error in each function.

@franchb franchb added the enhancement New feature or request label Jul 8, 2024
@franchb franchb self-assigned this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant