Expose ErrorContexts
Description
Environment
Gerrit Reviews
Release Notes Description
Activity
David Kelly March 24, 2020 at 5:41 PM
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.
True @Matt Ingenthron - 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!