Improve console log message on errors like 404

Former '404 Not found' plus weird HTML snippet is now: '404 Not Found:
 Page not found. Enabling the "bpapp" module might help!'
This commit is contained in:
Thomas Gelf 2014-05-09 12:08:38 +00:00
parent 19220a5a44
commit cf82ac68cc
1 changed files with 5 additions and 1 deletions

View File

@ -500,7 +500,11 @@
this.icinga.ui.fixControls();
}
} else if (req.status > 0) {
this.icinga.logger.error(req.status, errorThrown, req.responseText.slice(0, 100));
this.icinga.logger.error(
req.status,
errorThrown + ':',
$(req.responseText).text().slice(0, 100)
);
this.renderContentToContainer(
req.responseText,
req.$target,