Take this endpoint:
@Endpoint(id = "test")
@Component
public class TestEndpoint {
@ReadOperation
public Mono<String> sessionsForUsername(String username) {
return Mono.just("test");
}
}
When I execute curl http://localhost:8080/actuator/test, I get
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 139
{
"timestamp": "2024-01-18T10:44:27.123+00:00",
"path": "/actuator/test",
"status": 500,
"error": "Internal Server Error",
"requestId": "3076ac2f-2"
}
When I remove the Mono, or I use WebMVC, i get a 400 Bad Request, like i would have expected it.
HTTP/1.1 400
Content-Type: application/json
Transfer-Encoding: chunked
Date: Thu, 18 Jan 2024 10:45:36 GMT
Connection: close
{
"timestamp": "2024-01-18T10:45:36.289+00:00",
"status": 400,
"error": "Bad Request",
"path": "/actuator/test"
}
Reproducer: repro.zip
Comment From: scottfrederick
Closing in favor of #39397