mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
🐛 Fixed missing errors on failed import
no issue - bug was introduced in https://github.com/TryGhost/Ghost-Admin/pull/902 where the change to `response.payload.errors` from `error.errors` was missed
This commit is contained in:
parent
8c39ebfd8b
commit
99c60d5060
1 changed files with 5 additions and 4 deletions
|
@ -156,13 +156,14 @@ export default Controller.extend({
|
|||
});
|
||||
}).catch((response) => {
|
||||
if (isUnsupportedMediaTypeError(response) || isRequestEntityTooLargeError(response)) {
|
||||
this.set('importErrors', [response]);
|
||||
return;
|
||||
return this.set('importErrors', [response]);
|
||||
}
|
||||
|
||||
if (response && response.errors && isEmberArray(response.errors)) {
|
||||
this.set('importErrors', response.errors);
|
||||
if (response && response.payload.errors && isEmberArray(response.payload.errors)) {
|
||||
return this.set('importErrors', response.payload.errors);
|
||||
}
|
||||
|
||||
throw response;
|
||||
}).finally(() => {
|
||||
this.set('uploadButtonText', 'Import');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue