mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-22 14:16:59 +01:00
ResultsController: fix request exception handling
This commit is contained in:
@@ -125,6 +125,9 @@ namespace Jackett.Controllers.V20
|
|||||||
{
|
{
|
||||||
base.OnActionExecuted(actionExecutedContext);
|
base.OnActionExecuted(actionExecutedContext);
|
||||||
|
|
||||||
|
if (actionExecutedContext.Exception != null)
|
||||||
|
throw new Exception("Error while executing request", actionExecutedContext.Exception);
|
||||||
|
|
||||||
var content = actionExecutedContext.Response.Content as ObjectContent;
|
var content = actionExecutedContext.Response.Content as ObjectContent;
|
||||||
actionExecutedContext.Response.Content = new JsonContent(content.Value);
|
actionExecutedContext.Response.Content = new JsonContent(content.Value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user