-
Notifications
You must be signed in to change notification settings - Fork 23
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
AsyncServerInterceptor fails when non-existent service is invoked #46
Comments
So interesting - I just found this today - also from using if next_handler is None:
return right here: https://github.com/d5h-foss/grpc-interceptor/blob/master/src/grpc_interceptor/server.py#L123 Which is what the non-async one does here: |
Good find, thank you! I've been busy with work but will get to this when I have time. Or happy to review a PR if you'd like to take a stab at it. |
Thanks @dan-hipschman @metasyn I have sent #48 to fix, it was nice seeing there was already a test that just needed to be parameterized |
Thanks again for the fix! The release is out now. |
What versions of the following are you using?
python
: 3.11grpc-interceptor
: 0.15.3grpcio
: 1.59.2protobuf
: 4.24.4What operating system (Linux, Windows,...) and version?
Mac
What did you do?
Define an
AsyncServerInterceptor
and query the server withgrpcurl
.What did you expect to see?
Service is executed
What did you see instead?
AttributeError: 'NoneType' object has no attribute 'unary_unary'
Anything else we should know about your project / environment?
This happens because
next_handler
isNone
here if the requested service doesn't existhttps://github.com/d5h-foss/grpc-interceptor/blob/master/src/grpc_interceptor/server.py#L123
This effectively makes it not possible to use
grpcurl
which first queries with non-alpha reflection API before falling back to alpha one if it's not implemented. But the internal server error is not handled with that fallback it seems.The text was updated successfully, but these errors were encountered: