public RestError transformException(int httpStatus) { RestError restError = new RestError(); restError.setHttpStatus(httpStatus); restError.setServiceId(errorCode.getServiceId()); restError.setErrorCode(errorCode.getErrorCode()); restError.setDebugMessage(debugMessage); restError.setMessageArgs(messageArgs); return restError; }