mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
added an abstraction layer for json serializer, should work in mono.
This commit is contained in:
parent
213c842050
commit
65ae894410
14 changed files with 94 additions and 98 deletions
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Nancy;
|
||||
using Nancy.Responses;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Api.Extensions;
|
||||
|
||||
namespace NzbDrone.Api.ErrorManagement
|
||||
|
@ -15,7 +13,7 @@ namespace NzbDrone.Api.ErrorManagement
|
|||
public HttpStatusCode StatusCode { get; private set; }
|
||||
|
||||
protected ApiException(HttpStatusCode statusCode, object content = null)
|
||||
: base(GetMessage(statusCode, content))
|
||||
: base(GetMessage(statusCode, content))
|
||||
{
|
||||
StatusCode = statusCode;
|
||||
Content = content;
|
||||
|
@ -32,7 +30,7 @@ namespace NzbDrone.Api.ErrorManagement
|
|||
|
||||
if (content != null)
|
||||
{
|
||||
result = result + " :" + JsonConvert.SerializeObject(content);
|
||||
result = result + " :" + content;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue