@5minds/node-red-contrib-processcube 0.12.0 → 0.13.0-develop-930077-lygs2i9d
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -7,6 +7,7 @@ const DELAY_FACTOR = 0.85;
|
|
7
7
|
module.exports = function(RED) {
|
8
8
|
function ProcessCubeEngineNode(n) {
|
9
9
|
RED.nodes.createNode(this, n);
|
10
|
+
const node = this;
|
10
11
|
const identityChangedCallbacks = [];
|
11
12
|
this.url = n.url;
|
12
13
|
this.identity = null;
|
@@ -25,7 +26,13 @@ module.exports = function(RED) {
|
|
25
26
|
const engineClient = new engine_client.EngineClient(this.url);
|
26
27
|
|
27
28
|
engineClient.applicationInfo.getAuthorityAddress().then(authorityUrl => {
|
28
|
-
startRefreshingIdentityCycle(this.credentials.clientId, this.credentials.clientSecret, authorityUrl, this)
|
29
|
+
startRefreshingIdentityCycle(this.credentials.clientId, this.credentials.clientSecret, authorityUrl, this).catch(reason => {
|
30
|
+
console.error(reason);
|
31
|
+
node.error(reason);
|
32
|
+
});
|
33
|
+
}).catch((reason) => {
|
34
|
+
console.error(reason);
|
35
|
+
node.error(reason);
|
29
36
|
});
|
30
37
|
}
|
31
38
|
}
|