Subdoc operation throws CouchbaseException instead of PathInvalidException

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:

Expect this to throw PathInvalidException, but actually get CouchbaseException complaining about unrecognized subdoc status code.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

David Nault November 3, 2022 at 8:02 PM

Hi Emilien. Does this look like something you'd be interested in fixing?

David Nault November 3, 2022 at 2:44 AM
Edited

Looks like the fix is to add this case to MemcachedProtocol.mapSubdocumentError:

Would also be good to add a test for this case to `SubdocIntegrationTest`.

Unresolved
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created November 3, 2022 at 2:42 AM
Updated January 26, 2023 at 4:44 PM
Instabug