Details
Description
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
Attachments
Issue Links
- duplicates
-
SPR-17564 WebClient logs "Only one connection receive subscriber allowed" when response status is an error
-
- Closed
-