mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix error display #662
This commit is contained in:
@@ -104,10 +104,22 @@ function callExport() {
|
||||
// show download
|
||||
showDownload();
|
||||
|
||||
}).fail(function () {
|
||||
}).fail(function (data) {
|
||||
// show error.
|
||||
// show form again.
|
||||
showError('The export failed. Please check the log files to find out why.');
|
||||
|
||||
var errorText = 'The export failed. Please check the log files to find out why.';
|
||||
if (typeof data.responseJSON === 'object') {
|
||||
errorText = '';
|
||||
for (var propt in data.responseJSON) {
|
||||
if (data.responseJSON.hasOwnProperty(propt)) {
|
||||
errorText += propt + ': ' + data.responseJSON[propt][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
showError(errorText);
|
||||
|
||||
|
||||
// stop polling:
|
||||
window.clearTimeout(intervalId);
|
||||
|
Reference in New Issue
Block a user