forked from extern/FakeRelay
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");
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user