micronaut-core
micronaut-core copied to clipboard
ExceptionHandler implementation is not handling errors
Expected Behavior
After I implement an ExceptionHandler class for a RedisConnectionException, my handler (RedisErrorHandler) is invoked when a RedisConnectionException is thrown.
Actual Behaviour
The RedisErrorHandler.handle method (see example application) is not called after a RedisConnectionException is thrown.
Steps To Reproduce
- Check out the example application
- Verify that Redis is not running on localhost:6379.
lsof -i :6379returns nothing. - Run the tests
./mvnw verify - See the broken MonkeyTest
Environment Information
- Operating System: macOS Sonoma 14.3
- Java SDK: 21.0.2
- Java SDK Vender: Zulu
Example Application
https://github.com/sparrowlegs/micronaut-error-handler-bug
Version
4.2.4
the test passes for me on linux, without redis running.
I've added a Docker file to help with testing. Just run:
docker build -t micronaut-error-handler-bug .
The tests fail, even on linux.