Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-1231

Missing error context when a DocumentExistsError is thrown within a transaction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • 4.x
    • None
    • None
    • None
    • 0

    Description

      The following will fail as expected, but the error does not contain the context.
      This is not coming from the nodejs land, so it's either the binding or the cpp lib.

      await collection.insert('myDoc', { foo: 'bar' });
       
      cluster.transactions().run(
        async (attempt) => {
       
          try {
            await attempt.insert(collection, 'myDoc', { foo: 'baz' });
          } catch (err) {
            // err.cause.context should not be undefined
          }
        }
      )
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jared.casey Jared Casey
            JesusTheHun Jonathan MASSUCHETTI
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty