[backend/core] Catch failed resolves in ImportFollowingAsync

This commit is contained in:
pancakes 2024-11-06 00:32:34 +10:00
parent ceb8da8f3d
commit 4d85fce1cf
No known key found for this signature in database
GPG key ID: ED53D426432B861B

View file

@ -36,16 +36,15 @@ public class ImportExportService(
{
foreach (var fqn in fqns)
{
var followee = await userResolver.ResolveAsync($"acct:{fqn}", ResolveFlags.Acct);
try
{
var followee = await userResolver.ResolveAsync($"acct:{fqn}", ResolveFlags.Acct);
await userSvc.FollowUserAsync(user, followee);
}
catch (Exception e)
{
logger.LogWarning("Failed to import follow {followee} for user {follower}: {error}",
followee.Id, user.Id, e);
fqn, user.Id, e);
}
}