@worktables/n8n-nodes-worktables 12.30.3 → 12.40.0

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.
@@ -4563,11 +4563,24 @@ class Worktables {
4563
4563
  const firstError = parsed.errors || { message: 'Unknown error' };
4564
4564
  const errorData = Array.isArray(firstError) ? firstError[0] : firstError;
4565
4565
  console.log('Error:', errorData);
4566
- const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
4567
- message: errorData.message || 'Unknown error',
4568
- description: JSON.stringify(errorData, null, 2),
4569
- });
4570
- throw error;
4566
+ const continueOnFail = this.continueOnFail();
4567
+ if (continueOnFail) {
4568
+ return [[{
4569
+ json: {
4570
+ error: {
4571
+ message: errorData.message || 'Unknown error',
4572
+ details: errorData,
4573
+ }
4574
+ }
4575
+ }]];
4576
+ }
4577
+ else {
4578
+ const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
4579
+ message: errorData.message || 'Unknown error',
4580
+ description: JSON.stringify(errorData, null, 2),
4581
+ });
4582
+ throw error;
4583
+ }
4571
4584
  }
4572
4585
  const parsedResponse = JSON.parse(responseRaw);
4573
4586
  const itemData = ((_u = parsedResponse.data) === null || _u === void 0 ? void 0 : _u.create_item) || ((_v = parsedResponse.data) === null || _v === void 0 ? void 0 : _v.create_subitem);
@@ -6049,11 +6062,24 @@ class Worktables {
6049
6062
  const parsed = JSON.parse(response.data);
6050
6063
  const firstError = parsed.errors || { message: 'Unknown error' };
6051
6064
  const errorData = Array.isArray(firstError) ? firstError[0] : firstError;
6052
- const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
6053
- message: errorData.message || 'Unknown error',
6054
- description: JSON.stringify(errorData, null, 2),
6055
- });
6056
- throw error;
6065
+ const continueOnFail = this.continueOnFail();
6066
+ if (continueOnFail) {
6067
+ return [[{
6068
+ json: {
6069
+ error: {
6070
+ message: errorData.message || 'Unknown error',
6071
+ details: errorData,
6072
+ }
6073
+ }
6074
+ }]];
6075
+ }
6076
+ else {
6077
+ const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
6078
+ message: errorData.message || 'Unknown error',
6079
+ description: JSON.stringify(errorData, null, 2),
6080
+ });
6081
+ throw error;
6082
+ }
6057
6083
  }
6058
6084
  }
6059
6085
  case 'createUpdate': {
@@ -6264,11 +6290,24 @@ class Worktables {
6264
6290
  const parsed = JSON.parse(parsedResponse.data);
6265
6291
  const firstError = parsed.errors || { message: 'Unknown error' };
6266
6292
  const errorData = Array.isArray(firstError) ? firstError[0] : firstError;
6267
- const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
6268
- message: errorData.message || 'Unknown error',
6269
- description: JSON.stringify(errorData, null, 2),
6270
- });
6271
- throw error;
6293
+ const continueOnFail = this.continueOnFail();
6294
+ if (continueOnFail) {
6295
+ return [[{
6296
+ json: {
6297
+ error: {
6298
+ message: errorData.message || 'Unknown error',
6299
+ details: errorData,
6300
+ }
6301
+ }
6302
+ }]];
6303
+ }
6304
+ else {
6305
+ const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
6306
+ message: errorData.message || 'Unknown error',
6307
+ description: JSON.stringify(errorData, null, 2),
6308
+ });
6309
+ throw error;
6310
+ }
6272
6311
  }
6273
6312
  return [[{ json: JSON.parse(response) }]];
6274
6313
  }
@@ -6593,11 +6632,25 @@ class Worktables {
6593
6632
  const firstError = parsed.errors || { message: 'Unknown error' };
6594
6633
  const errorData = Array.isArray(firstError) ? firstError[0] : firstError;
6595
6634
  console.log('Error:', errorData);
6596
- const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
6597
- message: errorData.message || 'Unknown error',
6598
- description: JSON.stringify(errorData, null, 2),
6599
- });
6600
- throw error;
6635
+ const continueOnFail = this.continueOnFail();
6636
+ console.log('Continue on fail:', continueOnFail);
6637
+ if (continueOnFail) {
6638
+ return [[{
6639
+ json: {
6640
+ error: {
6641
+ message: errorData.message || 'Unknown error',
6642
+ details: errorData,
6643
+ }
6644
+ }
6645
+ }]];
6646
+ }
6647
+ else {
6648
+ const error = new n8n_workflow_1.NodeApiError(this.getNode(), errorData, {
6649
+ message: errorData.message || 'Unknown error',
6650
+ description: JSON.stringify(errorData, null, 2),
6651
+ });
6652
+ throw error;
6653
+ }
6601
6654
  }
6602
6655
  }
6603
6656
  }