Catch http errors early in WebFingerService
This commit is contained in:
parent
f4a584b46a
commit
dc45ba8adc
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ public class WebFingerService(HttpClient client, HttpRequestService httpRqSvc) {
|
||||||
|
|
||||||
var req = httpRqSvc.Get(webFingerUrl, ["application/jrd+json", "application/json"]);
|
var req = httpRqSvc.Get(webFingerUrl, ["application/jrd+json", "application/json"]);
|
||||||
var res = await client.SendAsync(req);
|
var res = await client.SendAsync(req);
|
||||||
|
if (!res.IsSuccessStatusCode) return null;
|
||||||
return await res.Content.ReadFromJsonAsync<WebFingerResponse>();
|
return await res.Content.ReadFromJsonAsync<WebFingerResponse>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue