diff --git a/NzbDrone.Api/ErrorManagement/ErrorPipeline.cs b/NzbDrone.Api/ErrorManagement/ErrorPipeline.cs index 98539dfd1..c7df4b20b 100644 --- a/NzbDrone.Api/ErrorManagement/ErrorPipeline.cs +++ b/NzbDrone.Api/ErrorManagement/ErrorPipeline.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; using FluentValidation; using NLog; using Nancy; @@ -37,7 +36,7 @@ public Response HandleException(NancyContext context, Exception exception) } - _logger.ErrorException("Unexpected error", exception); + _logger.FatalException("Request Failed", exception); return new ErrorModel() diff --git a/UI/Instrumentation/ErrorHandler.js b/UI/Instrumentation/ErrorHandler.js index 7e5da2e05..635790804 100644 --- a/UI/Instrumentation/ErrorHandler.js +++ b/UI/Instrumentation/ErrorHandler.js @@ -26,7 +26,7 @@ define(function () { var message = { message : messageText, type : 'error', - hideAfter: 1000, + hideAfter : 1000, showCloseButton: true }; @@ -55,18 +55,17 @@ define(function () { var message = { type : 'error', - hideAfter: 1000, + hideAfter : 1000, showCloseButton: true }; if (xmlHttpRequest.status === 0 && xmlHttpRequest.readyState === 0) { message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.'; } else { - message.message = ajaxOptions.type + " " + ajaxOptions.url + " : " + xmlHttpRequest.statusText; + message.message = "[{0}] {1} : {2}".format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url); } window.Messenger().post(message); - alert('test'); return false; });