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

Handle errors in ClusterManager properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2.5
    • None
    • library
    • None
    • Couchbase 4.1.0-5005

    Description

      Currently when error appears during the createBucket operation, reported JS Error contains no error message.

      I noticed that Couchbase REST API returns 3 different formats of errors during createBucket operation. None of the format mathes the errData.reason format expected by the JS library.

      Regarding the createBucket operation, I've fixed the issue in my fork https://github.com/pavkriz/couchnode/commit/bfb6552da5f750ee4839053e1abad4cb1e0dde34
      But one should analyze the issue in wider context (which operations are affected?).

      Also consider fine-grained Errors' hierarchy, ie. different errors classes for different errors reported by the REST API. I did a quick hack in my fork in order to distinguish different errors by putting the response and HTTP status code into the Error so the calling code will be aware of it. May be it is also the way.

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            pavkriz Pavel Kriz
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty