You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the ReactorNettyClientRequestFactory within RestTemplate and RestClient. RestTemplate and RestClient take care of mapping IOExceptions to ResourceAccessExceptions.
In case of using the reactor.netty.http.client.HttpClient, ReactorNettyClientRequest, ReactorNettyClientResponse - RuntimeExceptions like IllegalStateException (caused by .block() calls), io.netty.handler.timeout.ReadTimeoutException etc. bubble thru - up to RestTemplate and RestClient consumers which should only know the RessoureAccessExceptions.
So most likely IOExceptions should be thrown in ReactorNettyClientRequest, ReactorNettyClientResponse methods.
Furthermore the behaviour is not consistent with other ClientHttpRequestFactory implementations
like JettyClientHttpRequestFactory, OkClientHttpRequestFactory, ...
The text was updated successfully, but these errors were encountered:
you throw in ReactorNettyClientRequest::convertException - after falling thru - the IOException this way:
return new IOException(ex.getMessage(), cause);
In case of eg. a io.netty.handler.timeout.ReadTimeoutException both are null - the message plus the cause.
So you loose the connex to ex and that it was a timeout that caused the exception.
Consumers like org.springframework.web.client.DefaultRestClient.DefaultRequestBodyUriSpec#createResourceAccessException
don't have this information at hand and throw a ResourceAccessException with "null" message.
Affects: Spring Framework Web 6.1.8
I use the
ReactorNettyClientRequestFactory
withinRestTemplate
andRestClient
.RestTemplate
andRestClient
take care of mappingIOException
s toResourceAccessException
s.In case of using the
reactor.netty.http.client.HttpClient
,ReactorNettyClientRequest
,ReactorNettyClientResponse
-RuntimeException
s likeIllegalStateException
(caused by .block()
calls),io.netty.handler.timeout.ReadTimeoutException
etc. bubble thru - up toRestTemplate
andRestClient
consumers which should only know theRessoureAccessException
s.So most likely
IOException
s should be thrown inReactorNettyClientRequest
,ReactorNettyClientResponse
methods.Furthermore the behaviour is not consistent with other
ClientHttpRequestFactory
implementationslike
JettyClientHttpRequestFactory
,OkClientHttpRequestFactory
, ...The text was updated successfully, but these errors were encountered: