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: Ensure server interceptors work with builder utility classes #2696

Conversation

murgatroid99
Copy link
Member

The idea with the part of the code modified here is that the user can pass in a partially filled in responder or server listener, and the rest of the object will be filled in with defaults so that the rest of the class can handle it more simply. Unfortunately, the specific strategy of doing that using the spread operator (...) works with unpopulated object fields, but not object fields set to undefined, which is what ResponderBuilder and ServerListenerBuilder produce.

The test auth interceptor partially populates both a listener and a resolver, so switching it to use the builders should ensure that it catches this problem on both sides.

@sergiitk
Copy link
Member

Makes sense

@murgatroid99 murgatroid99 merged commit c1df94e into grpc:@grpc/grpc-js@1.10.x Mar 26, 2024
3 of 5 checks passed
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.

None yet

3 participants