class ErrorHandler {

	public ResponseEntity<?> handleBindingErrorsForSearch(RequestInfo requestInfo,
			BindingResult bindingResultsForRequestInfo, BindingResult bindingResultsForSearchCriteria) {
		if (bindingResultsForRequestInfo != null && bindingResultsForRequestInfo.hasErrors()) {
			return getMissingParameterErrorResponse(bindingResultsForRequestInfo, requestInfo);
		}
		if (bindingResultsForSearchCriteria != null && bindingResultsForSearchCriteria.hasErrors()) {
			return getMissingParameterErrorResponse(bindingResultsForSearchCriteria, requestInfo);
		}
		return null;
	}

}