mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 21:08:52 -07:00
[backend] Catch errors in refetchPublicKeyForApId
This commit is contained in:
parent
3b85491ee4
commit
9b13ec9c0c
1 changed files with 10 additions and 5 deletions
|
@ -206,6 +206,7 @@ export default class DbResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async refetchPublicKeyForApId(user: CacheableRemoteUser): Promise<UserPublickey | null> {
|
public async refetchPublicKeyForApId(user: CacheableRemoteUser): Promise<UserPublickey | null> {
|
||||||
|
try {
|
||||||
await updatePerson(user.uri!, undefined, undefined, user);
|
await updatePerson(user.uri!, undefined, undefined, user);
|
||||||
let key = await UserPublickeys.findOneBy({ userId: user.id });
|
let key = await UserPublickeys.findOneBy({ userId: user.id });
|
||||||
if (key != null) {
|
if (key != null) {
|
||||||
|
@ -213,6 +214,10 @@ export default class DbResolver {
|
||||||
}
|
}
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
subscriber.on("message", async (_, data) => {
|
subscriber.on("message", async (_, data) => {
|
||||||
|
|
Loading…
Reference in a new issue