catch an exception

This commit is contained in:
Vincent Cloutier 2023-03-17 16:03:44 -04:00
parent 160ef97626
commit 37725dfd9c

View file

@ -196,9 +196,16 @@ namespace BirdsiteLive.Domain
apObject = activity.apObject
}
};
var result = await _activityPubService.PostDataAsync(acceptFollow, followerHost, activity.apObject);
return result == HttpStatusCode.Accepted ||
result == HttpStatusCode.OK; //TODO: revamp this for better error handling
try
{
var result = await _activityPubService.PostDataAsync(acceptFollow, followerHost, activity.apObject);
return result == HttpStatusCode.Accepted ||
result == HttpStatusCode.OK;
}
catch (Exception e)
{
return false;
}
}
public async Task<bool> SendRejectFollowAsync(ActivityFollow activity, string followerHost)