Return ErrorResponseMessage as ResponseBody in controller and replace with:
error: function (xhr) {
  molgenis.createAlert(JSON.parse(xhr.responseText).errors);
}