From c3e632d215950b19c035125df82b338c43393d14 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Tue, 28 Feb 2017 16:57:29 +0100 Subject: [PATCH] Improve error messages --- src/Jackett/Controllers/AdminController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Jackett/Controllers/AdminController.cs b/src/Jackett/Controllers/AdminController.cs index 020b8cfb0..eab4b2e47 100644 --- a/src/Jackett/Controllers/AdminController.cs +++ b/src/Jackett/Controllers/AdminController.cs @@ -273,11 +273,14 @@ namespace Jackett.Controllers } catch (Exception ex) { + var msg = ex.Message; + if (ex.InnerException != null) + msg += ": " + ex.InnerException.Message; logger.Error(ex, "Exception in test_indexer"); jsonReply["result"] = "error"; - jsonReply["error"] = ex.Message; + jsonReply["error"] = msg; if (indexer != null) - indexer.LastError = ex.Message; + indexer.LastError = msg; } return Json(jsonReply); }