n8n-nodes-pinterest 0.1.4 → 0.1.6

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.
@@ -146,6 +146,14 @@ class PinterestCookie {
146
146
  description: 'Force exact request shape and headers used by the referenced plugin. Disables retries/fallbacks for 1:1 parity while debugging.',
147
147
  displayOptions: { show: { resource: ['pin'], operation: ['create'] } },
148
148
  },
149
+ {
150
+ displayName: 'Debug: Return Raw Response',
151
+ name: 'debugRaw',
152
+ type: 'boolean',
153
+ default: false,
154
+ description: 'When enabled, include the full server response body and request payload in the output for troubleshooting. The node will not throw if Continue On Fail is enabled.',
155
+ displayOptions: { show: { resource: ['pin'], operation: ['create'] } },
156
+ },
149
157
  // Board ops
150
158
  {
151
159
  displayName: 'Operation',
@@ -303,6 +311,7 @@ class PinterestCookie {
303
311
  const title = this.getNodeParameter('title', i, '');
304
312
  const description = this.getNodeParameter('description', i, '');
305
313
  const additionalFields = this.getNodeParameter('additionalFields', i, {});
314
+ const debugRaw = this.getNodeParameter('debugRaw', i, false);
306
315
  const strictPluginMode = this.getNodeParameter('strictPluginMode', i, false);
307
316
  const binary = (_c = items[i].binary) === null || _c === void 0 ? void 0 : _c[binaryProperty];
308
317
  if (!binary)
@@ -441,13 +450,19 @@ class PinterestCookie {
441
450
  const id = String(pinData.id || '');
442
451
  const msg = createdRes.message || ((_a = createdRes.error) === null || _a === void 0 ? void 0 : _a.message) || '';
443
452
  const msgDetail = ((_b = createdRes.error) === null || _b === void 0 ? void 0 : _b.message_detail) || '';
444
- return { ok: Boolean(id), id, msg: String(msg || msgDetail || ''), body };
453
+ return { ok: Boolean(id), id, msg: String(msg || msgDetail || ''), body, payload };
445
454
  };
446
455
  let result = { ok: false };
456
+ const isLinkError = (msg) => /doesn['’]?t allow you to save Pins|does not allow you to save Pins|please make sure the url is correct/i.test(msg || '');
447
457
  if (strictPluginMode) {
448
458
  result = await attemptCreate(sendData);
449
- if (!result.ok)
459
+ if (!result.ok) {
460
+ if (debugRaw && this.continueOnFail()) {
461
+ returnData.push({ json: { error: result.msg || 'Create failed', response: result.body, request: sendData } });
462
+ continue;
463
+ }
450
464
  throw new Error(result.msg || result.body || 'Create failed');
465
+ }
451
466
  }
452
467
  else {
453
468
  // Try strategies progressively to avoid generic errors
@@ -470,10 +485,14 @@ class PinterestCookie {
470
485
  result = await attemptCreate(strat);
471
486
  if (result.ok)
472
487
  break;
473
- if (/doesn\'t allow you to save Pins|does not allow you to save Pins/i.test(result.msg || ''))
488
+ if (isLinkError(result.msg))
474
489
  continue;
475
490
  }
476
491
  if (!result.ok) {
492
+ if (debugRaw && this.continueOnFail()) {
493
+ returnData.push({ json: { error: result.msg || 'Create failed', response: result.body, request: strategies[strategies.length - 1] } });
494
+ continue;
495
+ }
477
496
  throw new Error(result.msg || result.body || 'Create failed');
478
497
  }
479
498
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pinterest",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "n8n community nodes for Pinterest v5 API (list boards, create pins)",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",