1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

Also add as data to exception so sentry gets it.

This commit is contained in:
Taloth Saldono
2018-06-08 19:58:58 +02:00
parent cb372f284d
commit 2ed5abf4d3
2 changed files with 14 additions and 1 deletions
@@ -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);