n8n-nodes-idb2b 3.0.3 → 3.0.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.
@@ -213,7 +213,7 @@ function validateContactData(name, email) {
213
213
  if (name.trim().length > 255) {
214
214
  throw new Error('Contact name cannot exceed 255 characters');
215
215
  }
216
- if (email) {
216
+ if (email !== undefined && email !== null) {
217
217
  validateEmailField(email);
218
218
  }
219
219
  }
@@ -302,6 +302,7 @@ class IDB2B {
302
302
  };
303
303
  }
304
304
  async execute() {
305
+ var _a;
305
306
  const items = this.getInputData();
306
307
  const returnData = [];
307
308
  // Time-based cleanup of expired tokens
@@ -562,6 +563,13 @@ class IDB2B {
562
563
  });
563
564
  continue;
564
565
  }
566
+ const httpError = error;
567
+ if ((_a = httpError === null || httpError === void 0 ? void 0 : httpError.response) === null || _a === void 0 ? void 0 : _a.data) {
568
+ const apiMessage = typeof httpError.response.data === 'object'
569
+ ? JSON.stringify(httpError.response.data)
570
+ : String(httpError.response.data);
571
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Request failed with status code ${httpError.response.status}: ${apiMessage}`, { itemIndex: i });
572
+ }
565
573
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
566
574
  }
567
575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-idb2b",
3
- "version": "3.0.3",
3
+ "version": "3.0.6",
4
4
  "description": "n8n community node for IDB2B - WhatsApp AI Agents",
5
5
  "main": "index.js",
6
6
  "scripts": {