mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Fix a few more type errors, whoops
This commit is contained in:
parent
b6e7a5529f
commit
ebce4a8b1d
3 changed files with 7 additions and 7 deletions
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue