@@ -75,7 +75,7 @@ module.exports = function (RED) {
75
75
try {
76
76
77
77
if ( config . thing !== "" && config . property !== "" ) {
78
- this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , this . organization ) ;
78
+ this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , config . organization ) ;
79
79
if ( this . arduinoRestClient ) {
80
80
this . arduinoRestClient . openConnections ++ ;
81
81
this . organization = config . organization ;
@@ -152,7 +152,7 @@ module.exports = function (RED) {
152
152
this . timeWindowUnit = config . timeWindowUnit ;
153
153
if ( connectionConfig && config . thing !== "" && config . thing !== "0" && config . property !== "" && config . property !== "0" ) {
154
154
try {
155
- this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , this . organization ) ;
155
+ this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , config . organization ) ;
156
156
if ( this . arduinoRestClient ) {
157
157
this . arduinoRestClient . openConnections ++ ;
158
158
if ( config . thing !== "" && config . property !== "" ) {
@@ -251,7 +251,7 @@ module.exports = function (RED) {
251
251
this . organization = config . organization ;
252
252
if ( connectionConfig && config . thing !== "" && config . thing !== "0" && config . property !== "" && config . property !== "0" ) {
253
253
try {
254
- this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , this . organization ) ;
254
+ this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , config . organization ) ;
255
255
if ( this . arduinoRestClient ) {
256
256
this . arduinoRestClient . openConnections ++ ;
257
257
if ( config . thing !== "" && config . property !== "" ) {
@@ -340,7 +340,7 @@ module.exports = function (RED) {
340
340
try {
341
341
342
342
if ( config . thing !== "" && config . property !== "" ) {
343
- this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , this . organization ) ;
343
+ this . arduinoRestClient = await connectionManager . getClientHttp ( connectionConfig , config . organization ) ;
344
344
if ( this . arduinoRestClient ) {
345
345
this . arduinoRestClient . openConnections ++ ;
346
346
this . organization = config . organization ;
@@ -476,7 +476,7 @@ module.exports = function (RED) {
476
476
}
477
477
} catch ( err ) {
478
478
str = RED . _ ( "arduino-iot-cloud.connection-error.wrong-cred-sys-unvail" ) ;
479
- console . log ( `Status : ${ err . status } , message: ${ err . error } ` ) ;
479
+ console . log ( `getThingsOrProperties status : ${ err . status } , message: ${ err . error } (error: ${ err } ) ` ) ;
480
480
return res . send ( JSON . stringify ( { error : str } ) ) ;
481
481
}
482
482
}
0 commit comments