In the following two examples, the first one (with the map()) tells me that there's an unhandled exception from readTree(), but not in the second example. Why so ? Thx!
Mono.just(jsonString)
.map(jsonString1 -> {
return new ObjectMapper().readTree(jsonString1);
})
.onErrorResume(IOException.class, error -> {
return Mono.error(new InvalidContentException("error with the JSON. " + error));
})
Mono.fromCallable(() -> {
return new ObjectMapper().readTree(jsonString);
})
.onErrorResume(IOException.class, error -> {
return Mono.error(new InvalidContentException("error with the JSON. " + error));
})