diff --git a/src/main/java/ca/gc/aafc/dina/export/api/generator/ObjectStoreExportGenerator.java b/src/main/java/ca/gc/aafc/dina/export/api/generator/ObjectStoreExportGenerator.java index 7aa54bc..edfda71 100644 --- a/src/main/java/ca/gc/aafc/dina/export/api/generator/ObjectStoreExportGenerator.java +++ b/src/main/java/ca/gc/aafc/dina/export/api/generator/ObjectStoreExportGenerator.java @@ -90,7 +90,7 @@ public CompletableFuture export(DataExport dinaExport) throws IOException ResponseBody body = response.body(); if (!response.isSuccessful() || body == null) { - throw new IllegalStateException("Can't read response body from object-store"); + throw new IllegalStateException("Can't read response body from object-store. Returned code: " + response.code()); } try (OutputStream outputStream = new FileOutputStream(destinationFile.toFile()); InputStream inputStream = body.byteStream()) {