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

grpc-js: Implement server interceptors #2650

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

murgatroid99
Copy link
Member

This is an implementation of gRFC L112, currently in review at grpc/proposal#406. I had to rewrite a lot of the server-side request handling code to accommodate the new API, and I think the result is an improvement.

I changed a couple of existing tests because the previous behavior was incorrect:

  • A test previously asserted that when a server sends an error, channelz counts it as a failed stream in the socket data. However, a stream should be counted as successful if the server explicitly ended it with trailers.
  • Previously, the server sent an OUT_OF_RANGE status when receiving an invalid grpc-timeout value, but the library is not allowed to generate that status, so I changed it to INTERNAL.

The new test file shows a few over-simplified examples of using the server interceptor API.

This fixes #419.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add server interceptors
2 participants