Skip to content

Commit

Permalink
feat : auth error발생시 서버 에러 메시지 전송
Browse files Browse the repository at this point in the history
  • Loading branch information
hyesung99 committed Oct 27, 2023
1 parent 1e5e5b1 commit 3f92491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/query/auth/useOauthLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ const useOauthLogin = ({ code }: OauthLoginRequest) => {
navigate(PATH.MAIN);
}
},
onError: () => {
onError: ({ data }) => {
//TODO: Toast 띄우기
navigate(PATH.LOGIN);
throw new Error('로그인 중 서버에서 오류가 발생했습니다');
throw new Error(data.message);
},
});
return {
Expand Down

0 comments on commit 3f92491

Please sign in to comment.