feature show toast for project save failure #1393
This commit is contained in:
parent
b8ba3b911d
commit
e057d717c1
1 changed files with 4 additions and 0 deletions
|
@ -167,6 +167,8 @@ export function saveProject(selectedFile = null, autosave = false) {
|
|||
.catch((error) => {
|
||||
const { response } = error;
|
||||
dispatch(endSavingProject());
|
||||
dispatch(setToastText('Failed to save project.'));
|
||||
dispatch(showToast(1500));
|
||||
if (response.status === 403) {
|
||||
dispatch(showErrorModal('staleSession'));
|
||||
} else if (response.status === 409) {
|
||||
|
@ -207,6 +209,8 @@ export function saveProject(selectedFile = null, autosave = false) {
|
|||
.catch((error) => {
|
||||
const { response } = error;
|
||||
dispatch(endSavingProject());
|
||||
dispatch(setToastText('Failed to save project.'));
|
||||
dispatch(showToast(1500));
|
||||
if (response.status === 403) {
|
||||
dispatch(showErrorModal('staleSession'));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue