diff --git a/src/controllers/nostr/relay.ts b/src/controllers/nostr/relay.ts index b2bb8dba..3fd6b29a 100644 --- a/src/controllers/nostr/relay.ts +++ b/src/controllers/nostr/relay.ts @@ -104,7 +104,7 @@ function connectStream(socket: WebSocket, ip: string | undefined) { for (const event of await store.query(filters, { limit: FILTER_LIMIT, timeout: Conf.db.timeouts.relay })) { send(['EVENT', subId, event]); } - } catch (e) { + } catch (e: any) { if (e instanceof RelayError) { send(['CLOSED', subId, e.message]); } else if (e.message.includes('timeout')) { diff --git a/src/signers/ConnectSigner.ts b/src/signers/ConnectSigner.ts index 6501bb8b..26a9cbc9 100644 --- a/src/signers/ConnectSigner.ts +++ b/src/signers/ConnectSigner.ts @@ -30,7 +30,7 @@ export class ConnectSigner implements NostrSigner { const signer = await this.signer; try { return await signer.signEvent(event); - } catch (e) { + } catch (e: any) { if (e.name === 'AbortError') { throw new HTTPException(408, { message: 'The event was not signed quickly enough' }); } else { @@ -44,7 +44,7 @@ export class ConnectSigner implements NostrSigner { const signer = await this.signer; try { return await signer.nip04.encrypt(pubkey, plaintext); - } catch (e) { + } catch (e: any) { if (e.name === 'AbortError') { throw new HTTPException(408, { message: 'Text was not encrypted quickly enough', @@ -59,7 +59,7 @@ export class ConnectSigner implements NostrSigner { const signer = await this.signer; try { return await signer.nip04.decrypt(pubkey, ciphertext); - } catch (e) { + } catch (e: any) { if (e.name === 'AbortError') { throw new HTTPException(408, { message: 'Text was not decrypted quickly enough', @@ -76,7 +76,7 @@ export class ConnectSigner implements NostrSigner { const signer = await this.signer; try { return await signer.nip44.encrypt(pubkey, plaintext); - } catch (e) { + } catch (e: any) { if (e.name === 'AbortError') { throw new HTTPException(408, { message: 'Text was not encrypted quickly enough', @@ -91,7 +91,7 @@ export class ConnectSigner implements NostrSigner { const signer = await this.signer; try { return await signer.nip44.decrypt(pubkey, ciphertext); - } catch (e) { + } catch (e: any) { if (e.name === 'AbortError') { throw new HTTPException(408, { message: 'Text was not decrypted quickly enough', diff --git a/src/trends.ts b/src/trends.ts index de91a33d..23f7ea4d 100644 --- a/src/trends.ts +++ b/src/trends.ts @@ -106,7 +106,7 @@ export async function updateTrendingTags( await handleEvent(label, signal); console.info(`Trending ${l} updated.`); - } catch (e) { + } catch (e: any) { console.error(`Error updating trending ${l}: ${e.message}`); } }