Updated scanner to infer when it has reached the end of results.
All checks were successful
ci / build-test (push) Successful in 2m18s
ci / publish-image (push) Has been skipped

This commit is contained in:
2026-03-07 01:26:04 -05:00
parent 1e01edf1b7
commit 62c2efab01
18 changed files with 193 additions and 79 deletions

View File

@@ -10,9 +10,12 @@ public abstract class ApiClient(IHttpService http, ILogger logger, JsonSerialize
{
protected async Task<T> GetJsonAsync<T>(string url, CancellationToken cancellationToken = default)
{
string response = await http.GetStringAsync(url, cancellationToken);
HttpStringResponse response = await http.GetAsync(url, cancellationToken);
return JsonSerializer.Deserialize<T>(response, json)
if (response.Content is null)
throw new Exception("No content to deserialize");
return JsonSerializer.Deserialize<T>(response.Content, json)
?? throw new InvalidOperationException($"Failed to deserialize JSON to {typeof(T).Name} from {url}.");
}