@5minds/node-red-contrib-processcube 0.5.6-develop-a98283-lxrzpgvk → 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/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
|
|