n8n-nodes-idb2b 3.0.3 → 3.0.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.
|
@@ -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
|
}
|