@5minds/node-red-contrib-processcube 0.5.5 → 0.5.7-develop-9cb5f7-lxu2vowj

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,11 +10,18 @@ module.exports = function(RED) {
10
10
 
11
11
  const externalTaskId = msg.externalTaskId;
12
12
 
13
+ let error = msg.error;
14
+
15
+ if (error === undefined) {
16
+ error.message = "An error occurred";
17
+ error.source = msg.payload;
18
+ }
19
+
13
20
  msg.payload = {
14
21
  "error": {
15
22
  errorCode: config.error,
16
- errorMessage: msg.error.message,
17
- errorDetails: msg.error.source
23
+ errorMessage: error.message,
24
+ errorDetails: error.source
18
25
  }
19
26
  };
20
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "0.5.5",
3
+ "version": "0.5.7-develop-9cb5f7-lxu2vowj",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "authors": [
package/usertask-input.js CHANGED
@@ -56,7 +56,7 @@ module.exports = function(RED) {
56
56
 
57
57
  node.send({ payload: {userTask: userTask } });
58
58
  } else {
59
- if (config.force_send_array == false) {
59
+ if (!config.force_send_array) {
60
60
  if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
61
61
  matchingFlowNodes.userTasks.forEach((userTask) => {
62
62
  node.send({ payload: { userTask: userTask } });