updated some error logging.

This commit is contained in:
Keivan Beigi 2013-05-03 19:15:46 -07:00
parent 381af184ce
commit ed089b01b1
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Linq;
using FluentValidation; using FluentValidation;
using NLog; using NLog;
using Nancy; using Nancy;
@ -37,7 +36,7 @@ namespace NzbDrone.Api.ErrorManagement
} }
_logger.ErrorException("Unexpected error", exception); _logger.FatalException("Request Failed", exception);
return new ErrorModel() return new ErrorModel()

View File

@ -62,11 +62,10 @@ define(function () {
if (xmlHttpRequest.status === 0 && xmlHttpRequest.readyState === 0) { if (xmlHttpRequest.status === 0 && xmlHttpRequest.readyState === 0) {
message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.'; message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.';
} else { } 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); window.Messenger().post(message);
alert('test');
return false; return false;
}); });