Skip to content

Commit

Permalink
Update actions.ts catch 401 error
Browse files Browse the repository at this point in the history
  • Loading branch information
guananya committed Nov 7, 2023
1 parent 19add07 commit 1b2ed6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/store/form/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export const saveData = () => (dispatch, getState) => {
dispatch(setData(e, false));
dispatch(loadingEnd());
dispatch(setUserEdited(false));
}).catch(e => { // catches 401 and other errors
console.error(e);
dispatch(loadingEnd());
alert("Error saving data " + e);
});
}

Expand Down Expand Up @@ -103,4 +107,4 @@ export const declineAdmission = () => (dispatch, getState) => {
dispatch(loadingEnd());
alert("Error " + e);
});
}
}

1 comment on commit 1b2ed6f

@Luceium
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad you liked my first commit in PR #285. I was wondering if you could merge my PR as well. I already handled merge conflicts and updated the target branch to 2024-root.

Please sign in to comment.