oracledb.getConnection({
user : "",
password : "",
connectString : ""
},
function(err, connection) {
if (err) {
console.log("Error while trying to connect to DB ", err.message);
callback(err.message);
} else {
//My Logic
}
});
I am connecting to remote oracledb using the above (pseudo)code. I work in windows environment. Connection string has the URL to connect to the remote DB. Now, if my username/password is incorrect/null, I am able to see that error. But, if the server is switched off, it is not coming into if section handling the error. How to catch the server shutdown error ?
Any leads will be helpful. TIA.