Skip to content

Commit f86d8c8

Browse files
authored
Map ETAG_MISMATCH error to IllegalArgumentException (#103)
1 parent 38631be commit f86d8c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver/src/main/java/oracle/nosql/driver/ops/serde/BinaryProtocol.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import static oracle.nosql.driver.util.BinaryProtocol.DURABILITY_ALL;
2525
import static oracle.nosql.driver.util.BinaryProtocol.DURABILITY_NONE;
2626
import static oracle.nosql.driver.util.BinaryProtocol.DURABILITY_SIMPLE_MAJORITY;
27+
import static oracle.nosql.driver.util.BinaryProtocol.ETAG_MISMATCH;
2728
import static oracle.nosql.driver.util.BinaryProtocol.EVENTUAL;
2829
import static oracle.nosql.driver.util.BinaryProtocol.EVOLUTION_LIMIT_EXCEEDED;
2930
import static oracle.nosql.driver.util.BinaryProtocol.ILLEGAL_ARGUMENT;
@@ -489,6 +490,8 @@ public static RuntimeException mapException(int code, String msg) {
489490
return new OperationNotSupportedException(msg);
490491
case TABLE_NOT_READY:
491492
return new TableNotReadyException(msg);
493+
case ETAG_MISMATCH:
494+
return new IllegalArgumentException(msg);
492495
default:
493496
return new NoSQLException("Unknown error code " + code + ": " +
494497
msg);

0 commit comments

Comments
 (0)