We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c5ff25 commit b4a132fCopy full SHA for b4a132f
src/routes/index.tsx
@@ -36,7 +36,12 @@ const AuthRoute = () => {
36
await reLogin();
37
setIsLoading(false);
38
} catch (e) {
39
- console.error(e);
+ if (e instanceof Error) {
40
+ if (e.message === 'REFRESH_TOKEN_EMPTY') {
41
+ setIsLoading(false);
42
+ console.error(e);
43
+ }
44
45
}
46
};
47
src/store/auth.ts
@@ -31,7 +31,7 @@ export const useAuthStore = create(
31
32
if (!refreshToken) {
33
set({ isLoggedIn: false });
34
- throw new Error('저장되어 있는 refreshToken이 없습니다.');
+ throw new Error('REFRESH_TOKEN_EMPTY');
35
try {
0 commit comments