diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java index e7589c41faa7..0b7b80a9fc7d 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java @@ -68,7 +68,7 @@ class DefaultWebClient implements WebClient { private static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate"; private static final Mono NO_HTTP_CLIENT_RESPONSE_ERROR = Mono.error( - new IllegalStateException("The underlying HTTP client completed without emitting a response.")); + () -> new IllegalStateException("The underlying HTTP client completed without emitting a response.")); private final ExchangeFunction exchangeFunction;