You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traun Leyden edited this page Nov 20, 2017
·
3 revisions
Wrap things at the library boundary rather than internally within the codebase -- for example, a call out to GoCB. This should avoid double-wrapping
Always use Cause() when comparing error types/values, eg change if err == couchbase.UpdateCancel -> if Cause(err) == couchbase.UpdateCancel
When wrapping an error, beware that it is a risky operation that can break code that compares errors types or values. Look at callers and make sure they are calling Cause()