mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -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> {
|
||||
try {
|
||||
await updatePerson(user.uri!, undefined, undefined, user);
|
||||
let key = await UserPublickeys.findOneBy({ userId: user.id });
|
||||
if (key != null) {
|
||||
|
@ -213,6 +214,10 @@ export default class DbResolver {
|
|||
}
|
||||
return key;
|
||||
}
|
||||
catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subscriber.on("message", async (_, data) => {
|
||||
|
|
Loading…
Reference in a new issue