Skip to content

Commit 2a11dbf

Browse files
committed
Switched create back to idempotent, comment adjustments
1 parent c3647d0 commit 2a11dbf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gcloud-java-core/src/main/java/com/google/cloud/BaseServiceException.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,11 @@ public BaseServiceException(IOException exception, boolean idempotent) {
110110
String reason = null;
111111
String location = null;
112112
String debugInfo = null;
113-
Error error = null;
114113
Boolean retryable = null;
115114
if (exception instanceof GoogleJsonResponseException) {
116115
GoogleJsonError jsonError = ((GoogleJsonResponseException) exception).getDetails();
117116
if (jsonError != null) {
118-
error = new Error(jsonError.getCode(), reason(jsonError));
117+
Error error = new Error(jsonError.getCode(), reason(jsonError));
119118
code = error.code;
120119
reason = error.reason;
121120
retryable = isRetryable(idempotent, error);

gcloud-java-dns/src/main/java/com/google/cloud/dns/spi/DefaultDnsRpc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public ManagedZone create(ManagedZone zone, Map<Option, ?> options) throws DnsEx
6161
.setFields(FIELDS.getString(options))
6262
.execute();
6363
} catch (IOException ex) {
64-
throw translate(ex, false);
64+
// todo this can cause misleading report of a failure, intended to be fixed within #924
65+
throw translate(ex, true);
6566
}
6667
}
6768

0 commit comments

Comments
 (0)