class ErrorHandler {

	public ResponseEntity<?> getUnExpectedErrorResponse(BindingResult bindingResults, RequestInfo requestInfo,
			String errorCause) {
		Error error = new Error();
		// Setting Error
		error.setCode(500);
		error.setMessage("UnExpected ERROR! While Processing the Request");
		error.setDescription(errorCause);

		ResponseInfo responseInfo = new ResponseInfo();
		// Setting ResponseInfo
		responseInfo.setApiId(requestInfo.getApiId());
		//responseInfo.setKey(requestInfo.getKey());
		responseInfo.setResMsgId(requestInfo.getMsgId());
		responseInfo.setStatus(HttpStatus.BAD_REQUEST.toString());
		//responseInfo.setTenantId(requestInfo.getTenantId());
		responseInfo.setTs(requestInfo.getTs());
		responseInfo.setVer(requestInfo.getVer());

		ErrorResponse errRes = new ErrorResponse();
		// Setting ErrorResponse
		errRes.setError(error);
		errRes.setResponseInfo(responseInfo);

		return new ResponseEntity<ErrorResponse>(errRes, HttpStatus.BAD_REQUEST);
	}

}