diff --git a/extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleCloudIdempotentImportExecutor.java b/extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleCloudIdempotentImportExecutor.java index 567f17ee6..dbab051a0 100644 --- a/extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleCloudIdempotentImportExecutor.java +++ b/extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleCloudIdempotentImportExecutor.java @@ -112,7 +112,7 @@ private void addResult(String idempotentId, T result) transaction.delete(getErrorKey(idempotentId, jobId)); } transaction.commit(); - } catch (DatastoreException e) { + } catch (DatastoreException | ExecutionException e) { monitor.severe(() -> jobIdPrefix + "Error writing result to datastore: " + e); } finally { errorsCache.invalidate(idempotentId); @@ -156,11 +156,7 @@ public boolean isKeyCached(String idempotentId) { @Override public Collection getErrors() { - try { - return ImmutableList.copyOf(getErrorDetailsForJob(jobId).values()); - } catch (IOException e) { - throw new IllegalStateException(e); - } + return ImmutableList.copyOf(getErrorDetailsForJob(jobId).values()); } // In non-tests setJobId is only ever called once per executor, so the initialization of