@5minds/node-red-contrib-processcube 1.5.10-feature-da6596-m4mj0476 → 1.5.10-feature-5e0d87-m4mjp8sy

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.5.10-feature-da6596-m4mj0476",
3
+ "version": "1.5.10-feature-5e0d87-m4mjp8sy",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -9,6 +9,8 @@ module.exports = function (RED) {
9
9
  const identityChangedCallbacks = [];
10
10
  node.identity = null;
11
11
 
12
+ node.url = RED.util.evaluateNodeProperty(n.url, n.urlType, node);
13
+
12
14
  node.credentials.clientId = RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node);
13
15
  node.credentials.clientSecret = RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node);
14
16
 
@@ -37,14 +39,24 @@ module.exports = function (RED) {
37
39
 
38
40
  if (node.credentials.clientId && node.credentials.clientSecret) {
39
41
  node.log("luis777")
40
- node.engineClient = new engine_client.EngineClient(node.url, {
41
- clientId: node.credentials.clientId,
42
- clientSecret: node.credentials.clientSecret,
43
- scope: 'engine_etw engine_read engine_write'
44
- });
42
+ try {
43
+
44
+ node.engineClient = new engine_client.EngineClient(node.url, {
45
+ clientId: node.credentials.clientId,
46
+ clientSecret: node.credentials.clientSecret,
47
+ scope: 'engine_etw engine_read engine_write'
48
+ });
49
+ }catch (e) {
50
+ node.error(JSON.stringify(e))
51
+ }
45
52
  } else {
46
- node.log("luis999")
47
- node.engineClient = new engine_client.EngineClient(node.url);
53
+ try {
54
+
55
+ node.log("luis999")
56
+ node.engineClient = new engine_client.EngineClient(node.url);
57
+ } catch(e) {
58
+ node.error(JSON.stringify(e))
59
+ }
48
60
  }
49
61
 
50
62
  node.on('close', async () => {