return response;
} catch (BackendFunctionalException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity(e.getBodyResponse(),e.getHttpStatus());
} catch (ResourceAccessException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
return response;
} catch (BackendFunctionalException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity(e.getBodyResponse(),e.getHttpStatus());
} catch (ResourceAccessException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
return response;
} catch (BackendFunctionalException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity<>(e.getHttpStatus());
} catch (ResourceAccessException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
return response;
} catch (BackendFunctionalException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity<>(e.getHttpStatus());
} catch (ResourceAccessException e) {
- LOGGER.error("error on calling " + url + " ," + e);
+ LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
ResponseEntity<GetRequestStatusResponse> response = restTemplate.exchange(url, HttpMethod.GET,
new HttpEntity<>(buildRequestHeader()), GetRequestStatusResponse.class);
logResponseGet(url, response);
- return response.getBody();
+ if (null == response)
+ return null;
+ else
+ return response.getBody();
} catch (BackendFunctionalException | ResourceAccessException e) {
LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
ResponseEntity<GetE2ERequestStatusResponse> response = restTemplate.exchange(callUrlFormated, HttpMethod.GET,
new HttpEntity<>(buildRequestHeader()), GetE2ERequestStatusResponse.class);
logE2EResponseGet(callUrlFormated, response);
- return response.getBody();
+ if (null == response)
+ return null;
+ else
+ return response.getBody();
} catch (BackendFunctionalException|ResourceAccessException e) {
LOGGER.error(ERROR_ON_CALLING + callUrlFormated + " ," + e);