Skip to content

Commit

Permalink
Switched create and delete back to idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
mderka committed Apr 14, 2016
1 parent c3647d0 commit f81a293
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public ManagedZone create(ManagedZone zone, Map<Option, ?> options) throws DnsEx
.setFields(FIELDS.getString(options))
.execute();
} catch (IOException ex) {
throw translate(ex, false);
// todo consider if this is idempotent within #924
throw translate(ex, true);
}
}

Expand Down Expand Up @@ -103,7 +104,8 @@ public boolean deleteZone(String zoneName) throws DnsException {
dns.managedZones().delete(this.options.projectId(), zoneName).execute();
return true;
} catch (IOException ex) {
DnsException serviceException = translate(ex, false);
// todo consider if this is idempotent within #924
DnsException serviceException = translate(ex, true);
if (serviceException.code() == HTTP_NOT_FOUND) {
return false;
}
Expand Down

0 comments on commit f81a293

Please sign in to comment.