catch aggregateexception

likely non-txt files like zips
This commit is contained in:
Collin Barrett 2018-02-11 17:28:43 -06:00
parent 362150f825
commit e8b7df996a

View file

@ -14,7 +14,10 @@ namespace FilterLists.Services.SnapshotService
public class SnapshotDe
{
private const int BatchSize = 1000;
private const string UserAgentString = @"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36";
private const string UserAgentString =
@"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36";
private readonly FilterListsDbContext dbContext;
private readonly FilterListViewUrlDto list;
private Snapshot snapshot;
@ -67,6 +70,11 @@ private async Task<string> TryGetContent()
snapshot.HttpStatusCode = null;
return null;
}
catch (AggregateException)
{
snapshot.HttpStatusCode = null;
return null;
}
}
private async Task<string> GetContent()