Also add as data to exception so sentry gets it.
This commit is contained in:
parent
cb372f284d
commit
2ed5abf4d3
|
@ -34,6 +34,18 @@ namespace NzbDrone.Common.Extensions
|
|||
|
||||
var contentSample = response.Content.Substring(0, Math.Min(response.Content.Length, 512));
|
||||
|
||||
if (response.Request != null)
|
||||
{
|
||||
ex.AddData("RequestUri", response.Request.Url.ToString());
|
||||
|
||||
if (response.Request.ContentSummary != null)
|
||||
{
|
||||
ex.AddData("RequestSummary", response.Request.ContentSummary);
|
||||
}
|
||||
}
|
||||
|
||||
ex.AddData("StatusCode", response.StatusCode.ToString());
|
||||
|
||||
if (response.Headers != null)
|
||||
{
|
||||
ex.AddData("ContentType", response.Headers.ContentType ?? string.Empty);
|
||||
|
|
|
@ -301,8 +301,9 @@ namespace NzbDrone.Core.Indexers
|
|||
{
|
||||
return parser.ParseResponse(response).ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.WithData(response.HttpResponse, 128*1024);
|
||||
_logger.Trace("Unexpected Response content ({0} bytes): {1}", response.HttpResponse.ResponseData.Length, response.HttpResponse.Content);
|
||||
throw;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue