feature show toast for project save failure #1393

This commit is contained in:
Sai Jatin K 2020-06-23 22:11:10 +05:30
parent b8ba3b911d
commit e057d717c1
No known key found for this signature in database
GPG key ID: 58A469B796EA80DF

View file

@ -167,6 +167,8 @@ export function saveProject(selectedFile = null, autosave = false) {
.catch((error) => { .catch((error) => {
const { response } = error; const { response } = error;
dispatch(endSavingProject()); dispatch(endSavingProject());
dispatch(setToastText('Failed to save project.'));
dispatch(showToast(1500));
if (response.status === 403) { if (response.status === 403) {
dispatch(showErrorModal('staleSession')); dispatch(showErrorModal('staleSession'));
} else if (response.status === 409) { } else if (response.status === 409) {
@ -207,6 +209,8 @@ export function saveProject(selectedFile = null, autosave = false) {
.catch((error) => { .catch((error) => {
const { response } = error; const { response } = error;
dispatch(endSavingProject()); dispatch(endSavingProject());
dispatch(setToastText('Failed to save project.'));
dispatch(showToast(1500));
if (response.status === 403) { if (response.status === 403) {
dispatch(showErrorModal('staleSession')); dispatch(showErrorModal('staleSession'));
} else { } else {