From b6e9ace597a2a07eb41b5baf213ec6b690b9ab80 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Tue, 25 Sep 2018 19:37:40 +0100 Subject: [PATCH] Temporary fix for HTTP 500 errors from Wikibase. Closes #1746 --- .../org/openrefine/wikidata/editing/EditBatchProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/wikidata/src/org/openrefine/wikidata/editing/EditBatchProcessor.java b/extensions/wikidata/src/org/openrefine/wikidata/editing/EditBatchProcessor.java index b4afae964..e9822ee23 100644 --- a/extensions/wikidata/src/org/openrefine/wikidata/editing/EditBatchProcessor.java +++ b/extensions/wikidata/src/org/openrefine/wikidata/editing/EditBatchProcessor.java @@ -192,7 +192,8 @@ public class EditBatchProcessor { logger.info("Requesting documents"); currentDocs = null; int retries = 3; - while (currentDocs == null && retries > 0) { + // TODO: remove currentDocs.isEmpty() once https://github.com/Wikidata/Wikidata-Toolkit/issues/402 is solved + while ((currentDocs == null || currentDocs.isEmpty()) && retries > 0) { try { currentDocs = fetcher.getEntityDocuments(qidsToFetch); } catch (MediaWikiApiErrorException e) {