@bkmj/node-red-contrib-odbcmj 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/odbc.js +11 -1
- package/package.json +1 -1
package/odbc.js
CHANGED
|
@@ -214,6 +214,7 @@ module.exports = function(RED) {
|
|
|
214
214
|
} catch (error) {
|
|
215
215
|
if(typeof error == 'object'){
|
|
216
216
|
// Enhance the error object with query information
|
|
217
|
+
|
|
217
218
|
if(this?.queryString) error.query = this.queryString;
|
|
218
219
|
if(this?.parameters) error.params = msg.parameters;
|
|
219
220
|
if(error?.message){
|
|
@@ -221,7 +222,16 @@ module.exports = function(RED) {
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
else if (typeof error == 'string'){
|
|
224
|
-
|
|
225
|
+
const str = (() =>{
|
|
226
|
+
let str = ''
|
|
227
|
+
if(this?.queryString || this?.parameters){
|
|
228
|
+
str += " {"
|
|
229
|
+
if(this?.queryString) str += `"query":'${error.query}'`;
|
|
230
|
+
if(this?.parameters) str += `, "query":'${error.params}'`;
|
|
231
|
+
str += "}"
|
|
232
|
+
}
|
|
233
|
+
})()
|
|
234
|
+
error += str;
|
|
225
235
|
}
|
|
226
236
|
// Handle query errors
|
|
227
237
|
this.status({ fill: "red", shape: "ring", text: "Query error" });
|