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;
} }
const ret = await DiscoveryIRC(aq.callerInput.pubkey, { try {
host: "liberta.casa", const ret = await DiscoveryIRC(aq.callerInput.pubkey, {
...aq.callerInput?.options, host: "liberta.casa",
}); ...aq.callerInput?.options,
});
aq.respond(ret); aq.respond(ret);
} catch (e) {
aq.reject(e);
}
} }
addHandler("register", handleRegister); addHandler("register", handleRegister);