diff --git a/lib/transports/idbTransport.js b/lib/transports/idbTransport.js index 4d0a956..e958966 100644 --- a/lib/transports/idbTransport.js +++ b/lib/transports/idbTransport.js @@ -28,6 +28,11 @@ try { } function idbCall(config, xmlInput, cb) { + // idb transport is not available bail out + if (idb === null) { + cb(new Error('idb-connector was not found, ensure idb-connector is installed properly (idb-connector is only available on IBM i).'), null); + } + const { database = '*LOCAL', username = null, diff --git a/lib/transports/odbcTransport.js b/lib/transports/odbcTransport.js index ce219a9..9d257c6 100644 --- a/lib/transports/odbcTransport.js +++ b/lib/transports/odbcTransport.js @@ -28,6 +28,11 @@ try { } function odbcCall(config, xmlInput, done) { + // odbc transport is not available bail out + if (odbc === null) { + done(new Error('odbc transport was not found, ensure odbc is installed properly.'), null); + } + const { host = 'localhost', username = null,