diff --git a/src/index.ts b/src/index.ts index 416fbec..02f2980 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,12 +41,16 @@ async function handleDiscover(aq: ActiveQuery): Promise { return; } - const ret = await DiscoveryIRC(aq.callerInput.pubkey, { - host: "liberta.casa", - ...aq.callerInput?.options, - }); + try { + const ret = await DiscoveryIRC(aq.callerInput.pubkey, { + host: "liberta.casa", + ...aq.callerInput?.options, + }); - aq.respond(ret); + aq.respond(ret); + } catch (e) { + aq.reject(e); + } } addHandler("register", handleRegister);