From 5f389c76429090944703908bdf6f630bfe4dfcf0 Mon Sep 17 00:00:00 2001 From: Eunwoo Choi Date: Sun, 27 Aug 2023 22:07:56 +0900 Subject: [PATCH 1/2] fix: don't show TokenExpiredError --- utils/Jwt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/Jwt.ts b/utils/Jwt.ts index 96214a3f95..934f302475 100644 --- a/utils/Jwt.ts +++ b/utils/Jwt.ts @@ -17,7 +17,7 @@ export function verify(token?: string): any | null { try { return jwt.verify(token, publicPem) } catch(e) { - console.log(e) + if(e.name !== 'TokenExpiredError') console.log(e) return null } } From 152e07c983d52c61bfbfbce2f448ff29261a0e9b Mon Sep 17 00:00:00 2001 From: Eunwoo Choi Date: Sun, 27 Aug 2023 22:17:29 +0900 Subject: [PATCH 2/2] fix: use console.error instead of console.log --- utils/Jwt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/Jwt.ts b/utils/Jwt.ts index 934f302475..59479f13ae 100644 --- a/utils/Jwt.ts +++ b/utils/Jwt.ts @@ -17,7 +17,7 @@ export function verify(token?: string): any | null { try { return jwt.verify(token, publicPem) } catch(e) { - if(e.name !== 'TokenExpiredError') console.log(e) + if(e.name !== 'TokenExpiredError') console.error(e) return null } }