1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

New: Many UI Updates and Performance Tweaks

This commit is contained in:
Qstick
2019-04-12 23:25:58 -04:00
parent b24a40797f
commit 6275737ced
389 changed files with 7961 additions and 5635 deletions
+11 -2
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using FluentValidation;
using Nancy;
using Newtonsoft.Json;
using NzbDrone.Core.Datastore;
using Radarr.Http.Extensions;
@@ -194,8 +195,16 @@ namespace Radarr.Http.REST
protected TResource ReadResourceFromRequest(bool skipValidate = false)
{
//TODO: handle when request is null
var resource = Request.Body.FromJson<TResource>();
TResource resource;
try
{
resource = Request.Body.FromJson<TResource>();
}
catch (JsonReaderException e)
{
throw new BadRequestException($"Invalid request body. {e.Message}");
}
if (resource == null)
{