/// <summary> /// Checks that dependency calls don't throw /// exceptions. This will simply log. /// </summary> private async Task <bool> TryCheckDependencies() { _log.LogInformation("Trying services.."); bool isError = false; try { foreach (var feed in _feeds) { await feed.ReadAsync(); } } catch (Exception ex) { _log.LogError(ex, "Failed to load feeds."); isError = true; } try { await _historyRepo.FindAsync(1); } catch (Exception ex) { _log.LogError(ex, "Failed to use repository (history - likely database)."); isError = true; } try { if (!await _torrentClient.TryAuth()) { _log.LogError("Failed to authorize with Torrent client."); isError = true; } } catch (Exception ex) { _log.LogError(ex, "Failed to call the torrent client."); isError = true; } _log.LogInformation($"Service Status Check: " + (isError ? "FAILURE" : "SUCCESS")); return(!isError); }