Skip to content

Commit

Permalink
feat: handle expired token
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-rabot committed Jan 22, 2025
1 parent 1270689 commit 53dd676
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions front/src/page/resetPasswordPage/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export const submitConfirmPassword =
payload: errorMessage,
});
}
if (error.response?.data === 'TOKEN_EXPIRED') {
errorMessage = 'Le token est expiré';
return dispatch({
type: FETCH_RESET_PASSWORD_ERROR,
payload: errorMessage,
});
}
if (error.response?.data === 'KO') {
return dispatch({
type: FETCH_RESET_PASSWORD_ERROR,
Expand Down

0 comments on commit 53dd676

Please sign in to comment.