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

Error codes not returned by mock

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0.5
    • None
    • mock
    • Security Level: Public

    Description

      The mock library does not return Error Codes with the respinded errors. This prohibits effectively testing your production code against the mock, since tests like this fail:

      couchbase.get(..., function(error,result) {
      if (error.code == couchbase.errors.keyNotFound)

      { ... }

      ...
      })

      As a workaround, you currently have to test in addition for the error message returned by the mock. It is expected, that the mock also returnes CouchbaseErrors with the corresponding error codes set.

      Attachments

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

        Activity

          People

            brett19 Brett Lawson
            pbihler pbihler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty