-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Actuator web endpoints cannot respond with custom HTTP status codes when running on MVC or WebFlux #24123
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
I cloned this project and ran it on my machine, it is working.I did not modify anything, is there a problem where I did it? |
When accessing |
This problem did happen, and the http statuscode responded by the |
555 is indeed not existing Shouldn't spring boot allow non standard http code |
Thanks for the report. This should indeed by supported. Interestingly it works fine when the Actuator is running on Jersey but fails when running on Web MVC or WebFlux. |
Uh oh!
There was an error while loading. Please reload this page.
The issue can be reproduced the issue with following git project
Spring boot: v2.3.5.RELEASE
Java 8
In the application.propeties, the health status
Status.OUT_OF_SERVICE
is mapped to a custom http code 555:management.endpoint.health.status.http-mapping.out-of-service=555
HTTP code 555 is not a standard, but still a valid http code. Because of this, the health rest endpoint crashes with exception
[Request processing failed; nested exception is java.lang.IllegalArgumentException: No matching constant for [555]] with root cause
. The complete exception:The text was updated successfully, but these errors were encountered: