Skip to content

Commit 8241b1f

Browse files
committed
Use getNumber instead of ordinal to get DatastoreException code
1 parent 64115e4 commit 8241b1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gcloud-java-datastore/src/main/java/com/google/cloud/datastore/spi/DefaultDatastoreRpc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private static DatastoreException translate(
100100
}
101101
}
102102
return new DatastoreException(
103-
exception.getCode().ordinal(), exception.getMessage(), reason, exception);
103+
exception.getCode().getNumber(), exception.getMessage(), reason, exception);
104104
}
105105

106106
@Override

0 commit comments

Comments
 (0)