Expose ErrorContexts

Description

None

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

David Kelly March 24, 2020 at 5:41 PM

True  - I think the stuff that only comes back from the server (which only sometimes comes back at all) is what we get from lcb_resp_get_error_context and that is the extended error info and ref mentioned in the RFC.  Yea not a bonus, but part of the spec for sure.   Thx!

Matt Ingenthron March 24, 2020 at 3:12 PM

Just a quick note that I think the context is required per the error handling sdk-rfc, so it may not be a "bonus" per se.

David Kelly March 24, 2020 at 2:34 PM

Actually, the lcb_resp_get_error_context comes from the server only on some errors.  Instead, the operation's error context comes from lcb_respXXX_error_context where XXX is the operation you just performed.  This seems to be the main thing to implement here.  A bonus would be adding in the extra context (and perhaps the ref) when they are present, as extra error context info.  

David Kelly March 12, 2020 at 3:37 PM

We may have an issue with LCB returning the error contexts – see https://couchbasecloud.atlassian.net/browse/CCBC-1193#icft=CCBC-1193. However we still need to actually expose it - and since the RFC wants objects and not just a dict, there is some work to be done while we are looking into the lcb issue. At first glance we do call lcb_resp_get_error_ref and lcb_resp_get_error_context like you would expect, so maybe first thing here is to make the objects, be sure they are exposed in CouchbaseError, and go from there.

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

Details

Assignee

David Kelly

Reporter

Story Points

1

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created January 24, 2020 at 3:10 PM
Updated April 24, 2020 at 8:06 PM
Resolved March 30, 2020 at 3:13 PM
Instabug