I want to handle standard http errors the same way. How can I do it with Spring WebClient
? Instead of hanging status check on each call below
webClient.get()
.uri("http://localhost:8081/resource")
.retrieve()
.onStatus(HttpStatus::isError, clientResponse -> {
// some error handling logic
})
.bodyToMono(MyPojo.class);