Following code with spring boot grpc and security are used (when calling doSomething method) should throw exception in output, but it doesn't.
But if spring boot security is not used, code works as expected.
Spring Boot version - 3.5.6
https://github.com/maratkalibek/grpc-exception-demo/
Comment From: wilkinsona
Thanks for the report and sample. Unfortunately, it's not clear to me how to reproduce the problem. There are no instructions in the README and the test just checks that the context loads.
Comment From: maratkalibek
Hello, thank you for comment. Unfortunately I cannot reproduce error by tests. It works fine with in test environment, but when run application, it behaves incorrectly.
Here are the steps to reproduce this type of error.
- Start application main class
- With postman (sample.proto provided) call
FooService.doSomething
method. Server address islocalhost:9090
. Or you can any other tool.
Expected behaviour - MESSAGE FROM METHOD
is printed and exception is thrown (shown in the output).
Actual behaviour - Only MESSAGE FROM METHOD
is printed. No exception in the output.
- Alternatively you can disable spring security (commenting out spring-boot-starter-security dependency). After that application works as expected, but without spring security starter.
Comment From: maratkalibek
Just for information. Changing version of spring boot starter parent to: 1. 3.3.13 - works as expected 2. 3.4.10 - works incorrectly as described above 3. 4.0.0-M3 - application even doesn't start
Comment From: wilkinsona
Thanks. I think you'd be better off reporting this to the Spring gRPC project as we don't have much gRPC expertise on the Spring Boot team. If changes in Boot are needed, we can circle back here.