diff --git a/frontend/techpick/src/apis/apiClient.ts b/frontend/techpick/src/apis/apiClient.ts index 2f2f21ba7..bc20d87a5 100644 --- a/frontend/techpick/src/apis/apiClient.ts +++ b/frontend/techpick/src/apis/apiClient.ts @@ -21,10 +21,12 @@ export const apiClient = ky.create({ const parsedErrorMessage = error.message.split(' '); const errorCode = parsedErrorMessage.shift(); - if (!errorCode) { - /* empty */ - } else if (ERROR_MESSAGE_JSON[errorCode]) { - notifyError(ERROR_MESSAGE_JSON[errorCode]); + if (errorCode && ERROR_MESSAGE_JSON[errorCode]) { + if (errorCode === 'AU-001') { + window.location.href = '/login'; + } else { + notifyError(ERROR_MESSAGE_JSON[errorCode]); + } } } diff --git a/frontend/techpick/src/app/(unsigned)/login/failed/page.tsx b/frontend/techpick/src/app/(unsigned)/login/failed/page.tsx index eba2d7d97..17c69dd4f 100644 --- a/frontend/techpick/src/app/(unsigned)/login/failed/page.tsx +++ b/frontend/techpick/src/app/(unsigned)/login/failed/page.tsx @@ -39,7 +39,7 @@ export default function LoginFailedPage() {