code: public static Response getStatusResponse(Response.Status status, String... messages) {
  		if (status == null) {
  			return Response.status(Response.Status.BAD_REQUEST).build();
  		}
  		String msg = StringUtils.join(messages, ". ");
  		if (StringUtils.isBlank(msg)) {
  			msg = status.getReasonPhrase();
  		}
  		try {
  			return GenericExceptionMapper.getExceptionResponse(status.getStatusCode(), msg);
  		} catch (Exception ex) {
  			logger.error(null, ex);
  			return Response.status(Response.Status.BAD_REQUEST).build();
  		}
  	}
docs: A generic JSON response handler.
  @param status status code
  @param messages zero or more errors
  @return a response as JSON