🐛 Fixed missing error message for unexpected errors during import (#936)
no issue - show an error message when a non-Ghost error is received, eg. when a proxy server times out due to a large import
This commit is contained in:
parent
e7be0075d8
commit
191300de74
@ -171,11 +171,11 @@ export default Controller.extend({
|
||||
});
|
||||
}).catch((response) => {
|
||||
if (isUnsupportedMediaTypeError(response) || isRequestEntityTooLargeError(response)) {
|
||||
return this.set('importErrors', [response]);
|
||||
}
|
||||
|
||||
if (response && response.payload.errors && isEmberArray(response.payload.errors)) {
|
||||
return this.set('importErrors', response.payload.errors);
|
||||
this.set('importErrors', [response]);
|
||||
} else if (response && response.payload.errors && isEmberArray(response.payload.errors)) {
|
||||
this.set('importErrors', response.payload.errors);
|
||||
} else {
|
||||
this.set('importErrors', [{message: 'Import failed due to an unknown error. Check the Web Inspector console and network tabs for errors.'}]);
|
||||
}
|
||||
|
||||
throw response;
|
||||
|
Loading…
Reference in New Issue
Block a user