Subversion Repositories SmartDukaan

Rev

Rev 22319 | Rev 22931 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22319 Rev 22906
Line 61... Line 61...
61
		String uri = webapp+"/entity/"+entityId;
61
		String uri = webapp+"/entity/"+entityId;
62
		EntityResponse entityResponse=null;
62
		EntityResponse entityResponse=null;
63
		try {
63
		try {
64
			response = rc.get(uri, params);
64
			response = rc.get(uri, params);
65
			logger.info("Response is "+response);
65
			logger.info("Response is "+response);
66
		} catch (Exception | ProfitMandiBusinessException e) {
66
		} catch (Exception e) {
67
			logger.error("Unable to get entity "+entityId,e);
67
			logger.error("Unable to get entity "+entityId,e);
68
			final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), request.getRequestURL().toString() , HttpStatus.INTERNAL_SERVER_ERROR.toString(), HttpStatus.INTERNAL_SERVER_ERROR, ResponseStatus.FAILURE, entityResponse);
68
			final ProfitMandiResponse<?> profitMandiResponse=new ProfitMandiResponse<>(LocalDateTime.now(), request.getRequestURL().toString() , HttpStatus.INTERNAL_SERVER_ERROR.toString(), HttpStatus.INTERNAL_SERVER_ERROR, ResponseStatus.FAILURE, entityResponse);
69
			return new ResponseEntity<>(profitMandiResponse,HttpStatus.INTERNAL_SERVER_ERROR);
69
			return new ResponseEntity<>(profitMandiResponse,HttpStatus.INTERNAL_SERVER_ERROR);
70
		}
70
		}
71
		Gson gson = new Gson();
71
		Gson gson = new Gson();