@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.
- package/externaltask-error.js +9 -2
- package/package.json +1 -1
- package/usertask-input.js +1 -1
package/externaltask-error.js
CHANGED
@@ -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:
|
17
|
-
errorDetails:
|
23
|
+
errorMessage: error.message,
|
24
|
+
errorDetails: error.source
|
18
25
|
}
|
19
26
|
};
|
20
27
|
|
package/package.json
CHANGED
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
|
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 } });
|