mirror of
https://github.com/g3rv4/FakeRelay.git
synced 2024-11-24 16:23:10 +01:00
Log when there are exceptions
This commit is contained in:
parent
e05d91d93d
commit
4bc6c10aac
@ -42,8 +42,16 @@ public static class MastodonHelper
|
||||
requestContent.Headers.ContentType = new MediaTypeHeaderValue("application/activity+json");
|
||||
client.DefaultRequestHeaders.Date = date;
|
||||
|
||||
var response = await client.PostAsync($"https://{targetHost}/inbox", requestContent);
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
try
|
||||
{
|
||||
var response = await client.PostAsync($"https://{targetHost}/inbox", requestContent);
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine($"Exception {e.Message} when connecting to {targetHost}");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task ProcessInstanceFollowAsync(ActivityPubModel request)
|
||||
|
Loading…
Reference in New Issue
Block a user