fix: add try/catch to DiscoveryIRC

This commit is contained in:
Derrick Hammer 2023-07-20 12:56:05 -04:00
parent 72bfcfa13d
commit 6221a1a267
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 5 deletions

View File

@ -41,12 +41,16 @@ async function handleDiscover(aq: ActiveQuery): Promise<void> {
return; return;
} }
try {
const ret = await DiscoveryIRC(aq.callerInput.pubkey, { const ret = await DiscoveryIRC(aq.callerInput.pubkey, {
host: "liberta.casa", host: "liberta.casa",
...aq.callerInput?.options, ...aq.callerInput?.options,
}); });
aq.respond(ret); aq.respond(ret);
} catch (e) {
aq.reject(e);
}
} }
addHandler("register", handleRegister); addHandler("register", handleRegister);