mirror of
https://github.com/g3rv4/FakeRelay.git
synced 2025-08-18 16:58:10 +02:00
Log when there are exceptions
This commit is contained in:
@@ -42,8 +42,16 @@ public static class MastodonHelper
|
|||||||
requestContent.Headers.ContentType = new MediaTypeHeaderValue("application/activity+json");
|
requestContent.Headers.ContentType = new MediaTypeHeaderValue("application/activity+json");
|
||||||
client.DefaultRequestHeaders.Date = date;
|
client.DefaultRequestHeaders.Date = date;
|
||||||
|
|
||||||
var response = await client.PostAsync($"https://{targetHost}/inbox", requestContent);
|
try
|
||||||
return await response.Content.ReadAsStringAsync();
|
{
|
||||||
|
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)
|
public static async Task ProcessInstanceFollowAsync(ActivityPubModel request)
|
||||||
|
Reference in New Issue
Block a user