Closed
Description
Vladislav Kisel opened SPR-17615 and commented
On 4xx and 5xx status, using WebClient "retrieve" + "bodyTo..." causes swallowed exception:
java.lang.IllegalStateException: Only one connection receive subscriber allowed.
Example (kotlin):
WebClient.builder().build().get()
.uri("https://jira.atlassian.com/rest/api/latest/issue/QWERTY-123")
.retrieve()
.bodyToMono(String::class.java)
.test()
.expectError(WebClientResponseException::class.java)
.verify()
Probably exception handler subscribes to the connection itself so "bodyTo..." causes this exception.
Anyway, WebClientResponseException is being correctly thrown and IllegalStateException is just swallowed and printed to the output
Affects: 5.1.3
Issue Links:
- WebClient logs "Only one connection receive subscriber allowed" when response status is an error [SPR-17564] #22096 WebClient logs "Only one connection receive subscriber allowed" when response status is an error ("duplicates")