save non-200 http status code

ref #365
This commit is contained in:
Collin M. Barrett 2018-08-21 14:43:19 -05:00
parent 2901cbbdbe
commit f1541404ae

View file

@ -87,12 +87,14 @@ private async Task<IEnumerable<string>> TryGetLines()
}
catch (HttpRequestException hre)
{
await dbContext.SaveChangesAsync();
await TrackException(hre);
return null;
}
catch (WebException we)
{
snapEntity.HttpStatusCode = ((int)((HttpWebResponse)we.Response).StatusCode).ToString();
await dbContext.SaveChangesAsync();
await TrackException(we);
return null;
}