n8n-nodes-pinterest 0.1.4 → 0.1.5

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,18 @@ 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 };
447
456
  if (strictPluginMode) {
448
457
  result = await attemptCreate(sendData);
449
- if (!result.ok)
458
+ if (!result.ok) {
459
+ if (debugRaw && this.continueOnFail()) {
460
+ returnData.push({ json: { error: result.msg || 'Create failed', response: result.body, request: sendData } });
461
+ continue;
462
+ }
450
463
  throw new Error(result.msg || result.body || 'Create failed');
464
+ }
451
465
  }
452
466
  else {
453
467
  // Try strategies progressively to avoid generic errors
@@ -474,6 +488,10 @@ class PinterestCookie {
474
488
  continue;
475
489
  }
476
490
  if (!result.ok) {
491
+ if (debugRaw && this.continueOnFail()) {
492
+ returnData.push({ json: { error: result.msg || 'Create failed', response: result.body, request: strategies[strategies.length - 1] } });
493
+ continue;
494
+ }
477
495
  throw new Error(result.msg || result.body || 'Create failed');
478
496
  }
479
497
  }
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.5",
4
4
  "description": "n8n community nodes for Pinterest v5 API (list boards, create pins)",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",