-
Notifications
You must be signed in to change notification settings - Fork 38
GrpcExceptionHandler does not seem to be called when using Reactor generated stubs #143
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
Comments
That's sort of interesting. The Salesforce-generated code swallows the exception (and closes the server call), instead of rethrowing. I don't see any options to change that. Maybe you should take it up with the reactive-grpc authors? You can follow an (old) thread here: salesforce/reactive-grpc#234. That issue is still open, and they merged a PR that added the |
This should be working now (and I added a test), but not in AOT (until spring-projects/spring-framework#34642 is fixed). |
Thanks for the quick turnaround! |
Is this what you mean when you mean that the AOT needs to be fixed?
I am trying to run the tests on my fork using Gradle |
No, that's unrelated. Gradle is configured to compile AOT tests by default. Don't ask me why. Ask the Spring Boot team (I think it's a "feature" of the Boot Gradle plugin). Mind you, it shouldn't fail that way on that sample, so can you open a new issue here please? |
I am getting a new error after pulling main, and have logged the error here: #147 |
Greetings!
First of all, very glad to see that gRPC is becoming supported by the Spring ecosystem.
I spent the day attempting to migrate to use this library and found that the
GrpcExceptiionHandler
was not working as I would have expected it to.I have created a fork of this project and modified the
grpc-reactor
sample to demonstrate exactly what is going on here: https://github.com/svametcalf/spring-grpc/tree/reactor-error-handler. In short, I have registered the following exception handler:I am getting the following responses when using
grpcurl
:❯ grpcurl -d '{"name":"error"}' -plaintext localhost:9090 Simple.SayHello ERROR: Code: Unknown Message:
and
❯ grpcurl -d '{"name":"internal"}' -plaintext localhost:9090 Simple.SayHello ERROR: Code: Unknown Message:
Shouldn't those error codes be
INVALID
andINTERNAL
respectively?The text was updated successfully, but these errors were encountered: