fix: add try/catch to DiscoveryIRC
This commit is contained in:
parent
72bfcfa13d
commit
6221a1a267
14
src/index.ts
14
src/index.ts
|
@ -41,12 +41,16 @@ async function handleDiscover(aq: ActiveQuery): Promise<void> {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue