n8n-nodes-cribops 0.2.2 → 0.2.3
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.
- package/dist/package.json +1 -1
- package/dist/utils/HiveClient.js +14 -3
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/utils/HiveClient.js
CHANGED
|
@@ -37,11 +37,22 @@ class HiveClient {
|
|
|
37
37
|
}
|
|
38
38
|
async execute(operation, payload) {
|
|
39
39
|
const jsonPayload = JSON.stringify(payload);
|
|
40
|
-
|
|
40
|
+
let result;
|
|
41
|
+
try {
|
|
42
|
+
result = await this.redis.call('HIVE.EXEC', operation, jsonPayload);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
throw new Error(`HIVE.EXEC ${operation} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
46
|
+
}
|
|
41
47
|
if (result === null || result === undefined) {
|
|
42
|
-
throw new Error(`HIVE.EXEC ${operation} returned null -
|
|
48
|
+
throw new Error(`HIVE.EXEC ${operation} returned null - check Hive is running on the configured host`);
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
return JSON.parse(String(result));
|
|
52
|
+
}
|
|
53
|
+
catch (parseErr) {
|
|
54
|
+
throw new Error(`Failed to parse HIVE.EXEC response: ${String(result).substring(0, 100)}`);
|
|
43
55
|
}
|
|
44
|
-
return JSON.parse(String(result));
|
|
45
56
|
}
|
|
46
57
|
async ping() {
|
|
47
58
|
return this.execute('ping', {});
|