@RequestMapping(value="/policycreation/save_policy", method = RequestMethod.POST)
@ResponseBody
- public ResponseEntity<String> savePolicy(@RequestBody PolicyRestAdapter policyData, HttpServletResponse response) throws Exception{
+ public ResponseEntity<String> savePolicy(@RequestBody PolicyRestAdapter policyData, HttpServletResponse response){
String body = null;
HttpStatus status = HttpStatus.BAD_REQUEST;
Map<String, String> successMap = new HashMap<>();
policyData.setTtlDate("NA");
}else{
String dateTTL = policyData.getTtlDate();
- String newDate = convertDate(dateTTL, false);
+ String newDate = convertDate(dateTTL);
policyData.setTtlDate(newDate);
}
response.addHeader("error", "error");
}
}catch(Exception e){
+ LOGGER.error("Exception Occured : ",e);
if(policyDBDaoTransaction != null){
policyDBDaoTransaction.rollbackTransaction();
}
}
}
catch (Exception e){
- LOGGER.error("Exception Occured : "+e);
+ LOGGER.error("Exception Occured : "+e.getMessage(),e);
body = "error";
response.addHeader("error", e.getMessage());
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);