The way that ReadCancellationException is used in BodyExtractors is apparently meant to be an implementation detail:
|
.map(buffer -> { |
|
DataBufferUtils.release(buffer); |
|
throw new ReadCancellationException(); |
|
}) |
|
.onErrorResume(ReadCancellationException.class, ex -> Mono.empty()) |
However, if somewhere downstream in the pipeline an
onErrorContinue operator is appended, the exception does surface which caused me some confusion. Could this be implemented differently without throwing an exception?
The way that
ReadCancellationExceptionis used inBodyExtractorsis apparently meant to be an implementation detail:spring-framework/spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java
Lines 269 to 273 in 1bff7ce
However, if somewhere downstream in the pipeline an
onErrorContinueoperator is appended, the exception does surface which caused me some confusion. Could this be implemented differently without throwing an exception?