I am wondering if it is expected to get a
Error: cluster object was closed
message if one try’s to connect to a bucket that does not exist or misspelled ? I would say if one try’s to connect something that doesn’t exist or is misspelled , the SDK could provide a bit more info why the cluster object closed.
another thing which seems to be strange, if i go and try to get a doc which does not exist in my bucket i get an error cause code of 301
cause: LibcouchbaseError { code: 301 },
context: KeyValueErrorContext {
status_code: 1,
opaque: 7,
cas: CbCas { '0': <Buffer 00 00 00 00 00 00 00 00> },
key: 'cname::1234567',
bucket: 'CONTACTS',
collection: '_default',
scope: '_default',
context: '',
ref: ''
i can catch the error via
error instanceof couchbase.DocumentNotFoundError
But looking at the SDK error codes 301 does not make sense
Analytics Error Definitions
ID Range 300 - 399
# 301 CompilationFailure
Raised when error range 24xxx (excluded are specific codes in the errors below).
So where can i find a list of all valid correct cause codes and is there a list what errors i can catch via instance of…