diff --git a/server/eclipse-project/src/main/java/au/org/democracydevelopers/corla/endpoint/GetAssertions.java b/server/eclipse-project/src/main/java/au/org/democracydevelopers/corla/endpoint/GetAssertions.java index 034765c5..caab46b0 100644 --- a/server/eclipse-project/src/main/java/au/org/democracydevelopers/corla/endpoint/GetAssertions.java +++ b/server/eclipse-project/src/main/java/au/org/democracydevelopers/corla/endpoint/GetAssertions.java @@ -135,17 +135,18 @@ public String endpointBody(final Request the_request, final Response the_respons the_response.header("Content-Disposition", "attachment; filename*=UTF-8''assertions.zip"); ok(the_response); - return my_endpoint_result.get(); } catch (URISyntaxException | MalformedURLException e) { final String msg = "Bad configuration of raire-service url: " + raireUrl + ". Fix the config file."; LOGGER.error(String.format("%s %s %s", prefix, msg, e.getMessage())); - throw new RuntimeException(msg); + serverError(the_response, msg); } catch (IOException e) { final String msg = "Error creating zip file."; LOGGER.error(String.format("%s %s %s", prefix, msg, e.getMessage())); - throw new RuntimeException(e); + serverError(the_response, msg); } + + return my_endpoint_result.get(); } /**