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
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
The RestTemplate doesn't throw only RestClientExceptions. In my case, when the mobile connection is lost, I can get a HttpMessageNotReadableException :
org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: recvfrom failed: ETIMEDOUT (Connection timed
out); nested exception is java.net.SocketException: recvfrom failed: ETIMEDOUT (Connection timed out)
E at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readInternal(MappingJacksonHttpMessageConverter.java:1
25)
E at org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:147)
E at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:76)
E at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:655)
E at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:641)
E at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:484)
E at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:447)
E at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:422)
The exception is not catched and so my app crashes miserably.
Maybe AA should allow RestErrorHandler to catch all kinds of RuntimeExceptions ?