Skip to content

ReadCancellationException does not play well with onErrorContinue #24125

@chringwer

Description

@chringwer

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?

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions