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.