[Lada-commits] [PATCH 2 of 4] Response is not unsuccessful itself because of any single error

Wald Commits scm-commit at wald.intevation.org
Mon Oct 31 18:10:51 CET 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1477925405 -3600
# Node ID 960248dd98c377565b361b58a9ea8dbee7d79783
# Parent  cbd34e6716833a576671fd785b5f42deee8019cf
Response is not unsuccessful itself because of any single error.

The client gets the listing of all warnings and errors anyhow.

diff -r cbd34e671683 -r 960248dd98c3 src/main/java/de/intevation/lada/rest/importer/LafImportService.java
--- a/src/main/java/de/intevation/lada/rest/importer/LafImportService.java	Mon Oct 31 13:54:58 2016 +0100
+++ b/src/main/java/de/intevation/lada/rest/importer/LafImportService.java	Mon Oct 31 15:50:05 2016 +0100
@@ -93,8 +93,7 @@
             logger.debug("warns: " + importer.getWarnings().size());
             respData.put("warnings", importer.getWarnings());
         }
-        int code = 200;
-        Response response = new Response(importer.getErrors().isEmpty(), code, respData);
-        return response;
+
+        return new Response(true, 200, respData);
     }
 }


More information about the Lada-commits mailing list