n8n-nodes-arubaclearpass 1.0.3 → 1.0.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.
|
@@ -84,6 +84,19 @@ async function getDeviceByMac() {
|
|
|
84
84
|
return responseFormatter_1.formatResponse.call(this, responseData);
|
|
85
85
|
}
|
|
86
86
|
catch (error) {
|
|
87
|
+
// Handle 404 errors gracefully (device not found)
|
|
88
|
+
// This allows workflows to check for existence before creating
|
|
89
|
+
if (error instanceof Error) {
|
|
90
|
+
const errorAny = error;
|
|
91
|
+
// Check for 404 status code in various possible locations
|
|
92
|
+
const statusCode = errorAny.statusCode || errorAny.httpCode || errorAny.status ||
|
|
93
|
+
(errorAny.cause && (errorAny.cause.statusCode || errorAny.cause.httpCode || errorAny.cause.status));
|
|
94
|
+
if (statusCode === 404) {
|
|
95
|
+
// Return empty array to indicate device not found (allows workflow to continue)
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// For non-404 errors, throw as normal
|
|
87
100
|
const errorObject = {};
|
|
88
101
|
if (error instanceof Error) {
|
|
89
102
|
errorObject.message = error.message;
|
|
@@ -62,6 +62,19 @@ async function getEndpointByMac() {
|
|
|
62
62
|
return responseFormatter_1.formatResponse.call(this, responseData);
|
|
63
63
|
}
|
|
64
64
|
catch (error) {
|
|
65
|
+
// Handle 404 errors gracefully (endpoint not found)
|
|
66
|
+
// This allows workflows to check for existence before creating
|
|
67
|
+
if (error instanceof Error) {
|
|
68
|
+
const errorAny = error;
|
|
69
|
+
// Check for 404 status code in various possible locations
|
|
70
|
+
const statusCode = errorAny.statusCode || errorAny.httpCode || errorAny.status ||
|
|
71
|
+
(errorAny.cause && (errorAny.cause.statusCode || errorAny.cause.httpCode || errorAny.cause.status));
|
|
72
|
+
if (statusCode === 404) {
|
|
73
|
+
// Return empty array to indicate endpoint not found (allows workflow to continue)
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// For non-404 errors, throw as normal
|
|
65
78
|
console.log('Error in getEndpointByMac:', error);
|
|
66
79
|
throw error;
|
|
67
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-arubaclearpass",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "n8n community node for Aruba ClearPass API integration with comprehensive identity, policy, and enforcement profile management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|