org.springframework.web.client.RestTemplate method exchance(..) throws RestClientException which is parent of org.springframework.web.client.HttpStatusCodeException, what are the possible scenario when restTeamplte.exchange(...) could throw this exception?
I checked the javadoc and tried to search it on internet but no luck.
try {
final ResponseEntity<String> response = applicationApiTemplate.exchange(uri,
HttpMethod.GET, entity, String.class);
} catch(HttpStatusCodeException e) {
// when possibly i will get this error?
}