Authentificaton failure with an unhandled promise rejection

Hello,

I am trying to connect to Couchbase using a bad password and i have an Unhandled promise rejections error.
Is it an error from my code:

const couchbase = require('couchbase');
const cluster = new couchbase.Cluster('10.12.125.0,' {
    username: 'Administrator',
    password: 'badPassword',
});
const bucket = cluster.bucket('products');
const coll = bucket.defaultCollection();

const run = async() => {
    try {
        let res = await coll.remove("data::12454");
        console.log(JSON.stringify(res));
    } catch (error) {
        console.log(error);
    }
};

run().catch(e => console.log(e));

Thank you in advance.
Samir YAHIAOUI

Hey @SAMIR_YAHIAOUI,

This is a known issue with the 3.0.0 release of the SDK. The tracking issue is available below and is expected to be included in the 3.0.1 release of the SDK. Note that the unhandled rejection indicates that the credentials or connections were rejected and would not be succeeding anyways (though obviously it shouldn’t be exhibiting that issue).

https://issues.couchbase.com/browse/JSCBC-668

Cheers, Brett

1 Like