@pxp-nd/flow 1.1.6 → 1.1.8
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/dist/controllers/Flow.js +11 -4
- package/package.json +1 -1
package/dist/controllers/Flow.js
CHANGED
|
@@ -234,7 +234,7 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
async saveFlow(params, manager) {
|
|
237
|
-
var _a, _b;
|
|
237
|
+
var _a, _b, _c, _d;
|
|
238
238
|
let nodeRefIds = params.board.columns['2-column-nodes-configured'].taskIds;
|
|
239
239
|
let nodes = params.board.tasks ? params.board.tasks : [];
|
|
240
240
|
let masterId = null;
|
|
@@ -289,7 +289,7 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
289
289
|
});
|
|
290
290
|
if (connectionsToDel) {
|
|
291
291
|
const originalNodeCIds = connectionsToDel.map((node) => node.nodeConnectionId);
|
|
292
|
-
let flowNodeC = await
|
|
292
|
+
let flowNodeC = await manager.query(`DELETE
|
|
293
293
|
from twf_node_connection
|
|
294
294
|
WHERE node_connection_id = ${originalNodeCIds}`);
|
|
295
295
|
}
|
|
@@ -349,7 +349,14 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
catch (error) {
|
|
352
|
-
|
|
352
|
+
if (axios_1.default.isAxiosError(error) && error.response) {
|
|
353
|
+
const message = ((_c = (_b = error.response.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) || 'Unknown error';
|
|
354
|
+
throw new core_1.PxpError(400, message);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
console.error("Not valid json", error);
|
|
358
|
+
throw new core_1.PxpError(500, 'Unexpected error while processing the request');
|
|
359
|
+
}
|
|
353
360
|
}
|
|
354
361
|
}
|
|
355
362
|
}
|
|
@@ -397,7 +404,7 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
397
404
|
data: params,
|
|
398
405
|
};
|
|
399
406
|
const resControllerAxios = await (0, axios_1.default)(config);
|
|
400
|
-
const chainedFlowId = (
|
|
407
|
+
const chainedFlowId = (_d = resControllerAxios.data) === null || _d === void 0 ? void 0 : _d.flowId;
|
|
401
408
|
const parsedValues = {
|
|
402
409
|
flowId: chainedFlowId
|
|
403
410
|
};
|