[fix] Use request statusText on API error.

This commit is contained in:
opi 2015-11-15 16:18:23 +01:00
parent 8808bf264d
commit d442f8fc82
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -161,8 +161,8 @@ var app = Sammy('#main', function (sam) {
} }
} else if (typeof xhr.responseJSON !== 'undefined') { } else if (typeof xhr.responseJSON !== 'undefined') {
c.flash('fail', xhr.responseJSON.error); c.flash('fail', xhr.responseJSON.error);
} else if (typeof xhr.responseText !== 'undefined' && uri !== '/postinstall') { } else if (typeof xhr.statusText !== 'undefined' && uri !== '/postinstall') {
c.flash('fail', xhr.responseText); c.flash('fail', xhr.statusText);
} else { } else {
if (uri === '/postinstall') { if (uri === '/postinstall') {
if (installing) { if (installing) {