I am doing a batch call where overall response is success from batch API but some calls of batch might be failure so event if rest-Template provide successful response i want to parse the response and if i find an error status Code while parsing i want to retry whole batch call again. The problem is spring retry is not detecting any exception from rest-Template so its not doing retry.
ResponseEntity response = restTemplate.exchange(requestEntity, String.class);
here response is 200 so no retry by spring but what i want is to parse this String response and check if i have any 500 in my response if yes i want to retry this call.