Skip to content

Can't wrap a ClientResponse with a custom status code in a builder  #23366

@marcingrzejszczak

Description

@marcingrzejszczak

When using Spring WebFlux 5.1.8.RELEASE consider having the following code

ClientResponse response = ...;
ClientResponse wrapped = ClientResponse.from(response)
					.body(response.bodyToFlux(DataBuffer.class)
					.transform(this.scopePassingTransformer))
					.build()

when response contains a custom status code e.g. 499 the DefaultClientResponseBuilder in the constructor uses statusCode(other.statusCode()); and statusCode() throws an exception since it's a custom status code.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions