소스 검색

no more redirectToLogout on init error in dev and test envs

Olivier Massot 4 달 전
부모
커밋
6aa44bc4e8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      plugins/init.server.ts

+ 1 - 1
plugins/init.server.ts

@@ -46,7 +46,7 @@ export default defineNuxtPlugin(async () => {
   try {
     await initiateProfile(accessId, bearer.value ?? '', switchId)
   } catch (error) {
-    if (error instanceof UnauthorizedError) {
+    if (error instanceof UnauthorizedError && runtimeConfig.public.env === 'production') {
       redirectToLogout()
     } else {
       throw error