Make runtime diagnostics non-blocking and release 2.1.69
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-18 02:51:48 +02:00
1 parent 9d96f67261
commit 1e289ee49b
9 files changed
+129 -78

No files matched your search

+2 -2
View File
@@ -14,11 +14,11 @@ function createAgent(collectors) {
get_health: () => collectors.getHealth()
};
function handle(op, args) {
async function handle(op, args) {
const fn = (typeof op === 'string' && Object.prototype.hasOwnProperty.call(OPS, op)) ? OPS[op] : null;
if (typeof fn !== 'function') return { ok: false, error: `unknown or non-readonly op: ${op}` };
try {
const data = fn(args || {});
const data = await fn(args || {});
if (data && data.ok === false) return data;
return { ok: true, data };
} catch (e) {