@warleon/n8n-nodes-payload-cms 1.3.2 → 1.3.4
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.
|
@@ -382,6 +382,9 @@ class PayloadCms {
|
|
|
382
382
|
Authorization: authToken,
|
|
383
383
|
"Content-Type": "application/json",
|
|
384
384
|
};
|
|
385
|
+
config.validateStatus = (status) => {
|
|
386
|
+
return status < 500;
|
|
387
|
+
};
|
|
385
388
|
return (0, axios_1.default)(config);
|
|
386
389
|
}
|
|
387
390
|
async execute() {
|
|
@@ -503,9 +506,13 @@ class PayloadCms {
|
|
|
503
506
|
}
|
|
504
507
|
requestConfig = {
|
|
505
508
|
method: method,
|
|
509
|
+
maxBodyLength: Infinity,
|
|
506
510
|
url,
|
|
507
511
|
params,
|
|
508
512
|
data: formData,
|
|
513
|
+
headers: {
|
|
514
|
+
...formData.getHeaders(),
|
|
515
|
+
},
|
|
509
516
|
};
|
|
510
517
|
}
|
|
511
518
|
else {
|
|
@@ -534,8 +541,8 @@ class PayloadCms {
|
|
|
534
541
|
const status = error.response.status;
|
|
535
542
|
const data = error.response.data; // body from server
|
|
536
543
|
// Log to n8n logs
|
|
537
|
-
this.logger.
|
|
538
|
-
this.logger.
|
|
544
|
+
this.logger.info(`Request failed with status ${status}`);
|
|
545
|
+
this.logger.info(`Response body: ${JSON.stringify(data)}`);
|
|
539
546
|
returnData.push({
|
|
540
547
|
error: new n8n_workflow_1.NodeOperationError(this.getNode(), error),
|
|
541
548
|
json: data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warleon/n8n-nodes-payload-cms",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Dynamic n8n node for Payload CMS that auto-discovers collections and operations forked and extended from https://github.com/leadership-institute/n8n-payload-dynamic",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "warleon",
|