Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
1
Description
Suggested release note:
When a sub-document path has a syntax error or is inappropriate for an operation, the SDK now throws `PathInvalidException`. Prior to this change, it would throw a generic `CouchbaseException` with the message "Unexpected SubDocument response code".
Steps to reproduce:
collection.upsert("foo", emptyMap());
|
collection.mutateIn(
|
"foo",
|
singletonList(MutateInSpec.insert("x[1]", "bar"))
|
);
|
Expect this to throw PathInvalidException, but actually get CouchbaseException complaining about unrecognized subdoc status code.
Caused by: com.couchbase.client.core.error.CouchbaseException: Unexpected SubDocument response code {"completed":true,"coreId":"0xc20d295f00000001","idempotent":false,"index":0,"lastChannelId":"C20D295F00000001/000000007647928E","lastDispatchedFrom":"127.0.0.1:60950","lastDispatchedTo":"127.0.0.1:11210","path":"array[1]","requestId":105,"requestType":"SubdocMutateRequest","retried":0,"service":{"bucket":"default","collection":"_default","documentId":"SubdocAPI","errorCode":{"description":"Subdoc: Some (or all) commands failed. Inspect payload for details","name":"SUBDOC_MULTI_PATH_FAILURE"},"opaque":"0x67","scope":"_default","type":"kv","vbucket":56},"status":"SUBDOC_FAILURE","subdocStatus":"PATH_INVALID","timeoutMs":2500,"timings":{"dispatchMicros":303,"encodingMicros":20,"totalDispatchMicros":303,"totalServerMicros":0,"totalMicros":1058,"serverMicros":0}} at com.couchbase.client.java.AsyncUtils.block(AsyncUtils.java:51) at com.couchbase.client.java.Collection.mutateIn(Collection.java:581) at
|
.......
|
Attachments
Gerrit Reviews
For Gerrit Dashboard: JVMCBC-1160 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
185604,2 | JVMCBC-1160 Subdoc operation throws CouchbaseException instead of PathInvalidException | master | couchbase-jvm-clients | Status: MERGED | +2 | +1 |