use of org.hisp.dhis.dxf2.webmessage.responses.ErrorReportsWebMessageResponse in project dhis2-core by dhis2.
the class WebMessageUtils method errorReports.
public static WebMessage errorReports(List<ErrorReport> errorReports) {
WebMessage webMessage = new WebMessage();
webMessage.setResponse(new ErrorReportsWebMessageResponse(errorReports));
if (!errorReports.isEmpty()) {
webMessage.setStatus(Status.ERROR);
webMessage.setHttpStatus(HttpStatus.BAD_REQUEST);
}
return webMessage;
}
Aggregations