@Override
  public void addErrorsToJob(UUID jobId, Collection<ErrorDetail> errors) throws IOException {
    if (errors == null || errors.isEmpty()) {
      return;
    }
    List<Entity> entities = new ArrayList<>();
    for (ErrorDetail errorDetail : errors) {
      Key key = getErrorKey(jobId, errorDetail.id());
      entities.add(
          GoogleCloudUtils.createEntityBuilder(
                  key,
                  ImmutableMap.of(
                      JSON_DATA_FIELD,
                      // TODO: encrypt this data
                      objectMapper.writeValueAsString(errorDetail)))
              .build());
    }
    datastore.add(entities.toArray(new Entity[entities.size()]));
  }
Verifies a {@code PortabilityJob} already exists for {@code jobId}, and updates the entry to
{@code job}, within a {@code Transaction}. If {@code validator} is non-null,
validator.validate() is called first in the transaction.

@throws IOException if a job didn't already exist for {@code jobId} or there was a problem
    updating it @throws IllegalStateException if validator.validate() failed
extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleJobStore.java