mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-27 14:28:08 +09:00
[backend] Catch errors in UserRepository.userFromURI
This fixes sporadic errors during rendering of follower/following lists.
This commit is contained in:
parent
d8a75cdd08
commit
1c6ec9ad08
@ -241,6 +241,7 @@ export const UserRepository = db.getRepository(User).extend({
|
||||
},
|
||||
|
||||
async userFromURI(uri: string): Promise<User | null> {
|
||||
try {
|
||||
const dbResolver = new DbResolver();
|
||||
let local = await dbResolver.getUserFromApId(uri);
|
||||
if (local) {
|
||||
@ -259,6 +260,10 @@ export const UserRepository = db.getRepository(User).extend({
|
||||
}
|
||||
|
||||
return isActor(object) ? await createPerson(getApId(object)) : null;
|
||||
}
|
||||
catch {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
async getHasUnreadAntenna(userId: User["id"]): Promise<boolean> {
|
||||
|
Loading…
Reference in New Issue
Block a user