How do i know if a subDoc operation completed successful?

What is the best way to make sure an update of a Sub Doc has completed successful or without issues ? currently i get this back as an result …

DocumentFragment {
  cas: CouchbaseCas<1578507556934909952>,
  contents: [],
  pathMap: null,
  indexMap: null }

is it save to assume if there is a cas value it was successful ? If i use N1QL or any SQL i get a confirmation on updated rows docs etc but when doing this its like who knows if you it happened.

Hey @aponnath,

Sub-document mutations are all-or-nothing, so in the case of an error, an error will be returned by the SDK for the mutateIn operation. In the case of sub-document lookups, the overall operation will succeed, but individual results fetched from the contents will have an error property.

Cheers, Brett