Fixed "Saving failed: undefined" error message in editor

no issue

- if a ServerUnreachable error is triggered by a non-background-save then we'd show the expected custom alert and then immediately overwrite it because `savePost`'s catch was not expecting an `undefined` error
This commit is contained in:
Kevin Ansfield 2021-06-28 14:59:11 +01:00
parent 9105afe97c
commit a6c6def7e1

View File

@ -491,6 +491,11 @@ export default Controller.extend({
return post;
} catch (error) {
if (error === undefined) {
// validation error or "handled" error from _saveTask
return;
}
// trigger upgrade modal if forbidden(403) error
if (isHostLimitError(error)) {
this.post.rollbackAttributes();