diff --git a/src/hooks/query/auth/useOauthLogin.ts b/src/hooks/query/auth/useOauthLogin.ts index 3dcc9d06..3237194e 100644 --- a/src/hooks/query/auth/useOauthLogin.ts +++ b/src/hooks/query/auth/useOauthLogin.ts @@ -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 {