mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-21 23:44:20 +01:00
Fix a few more type errors, whoops
This commit is contained in:
@@ -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')) {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user