Affects: 5.2.0
Hi all,
It looks like the onStatus custom error predicates are now evaluated in the inverted order compared to version 5.1.x
Using the WebClient this way:
webClient.
// ...
.onStatus(
HttpStatus.BAD_REQUEST::equals,
res -> res.bodyToMono(Void.class).then(Mono.just(new SpecificException()))
)
.onStatus(
HttpStatus::isError,
res -> res.bodyToMono(Void.class).then(Mono.just(new GenericException())))
)
// ...
Using 5.1.0 first onStatus was evaluated first, using version 5.2.0 with the same WebClient usage, last onStatus is evaluated first and behavior is significantly changed.
This behavior change was introduced in commit a9b3d95
If this onStatus evaluation order is not guaranteed, I think that this should be documented.
I can submit a documentation or a fix pull request.
Thomas
Affects: 5.2.0
Hi all,
It looks like the
onStatuscustom error predicates are now evaluated in the inverted order compared to version5.1.xUsing the
WebClientthis way:Using
5.1.0firstonStatuswas evaluated first, using version5.2.0with the sameWebClientusage, lastonStatusis evaluated first and behavior is significantly changed.This behavior change was introduced in commit a9b3d95
If this
onStatusevaluation order is not guaranteed, I think that this should be documented.I can submit a documentation or a fix pull request.
Thomas