Skip to content

Commit 24040ec

Browse files
tfmorrisCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6d7c324 commit 24040ec

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/org/openrefine/extensions/commons/importer/FileFetcher.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private JsonNode getJson(HttpUrl url) throws IOException {
7979
if (response.body() != null) {
8080
return new ObjectMapper().readTree(response.body().string());
8181
} else {
82-
return new ObjectMapper().readTree("[]");
82+
return new ObjectMapper().readTree("{}");
8383
}
8484
} else {
8585
throw new IOException("API request failed with status code: " + response.code() + ", body: " + response.message());
@@ -179,8 +179,7 @@ public JsonNode next() {
179179
try {
180180
getContinuationResults(urlContinue);
181181
} catch (IOException e) {
182-
// TODO Auto-generated catch block
183-
e.printStackTrace();
182+
throw new UncheckedIOException("Failed to fetch continuation results for category: " + categoryName, e);
184183
}
185184
indexRow = 0;
186185
}

0 commit comments

Comments
 (0)