ResultsController: fix request exception handling

This commit is contained in:
kaso17 2017-09-13 12:01:07 +02:00
parent e309d96c51
commit ae6d5ccfc6
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ namespace Jackett.Controllers.V20
{
base.OnActionExecuted(actionExecutedContext);
if (actionExecutedContext.Exception != null)
throw new Exception("Error while executing request", actionExecutedContext.Exception);
var content = actionExecutedContext.Response.Content as ObjectContent;
actionExecutedContext.Response.Content = new JsonContent(content.Value);
}