From b4ed587fd71c2c128c60c9c0033c0519aeeca7fa Mon Sep 17 00:00:00 2001 From: JeongSH1 Date: Thu, 7 Dec 2023 12:17:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20err=20code=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noti.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noti.js b/noti.js index fc4a991..bf151b8 100644 --- a/noti.js +++ b/noti.js @@ -31,7 +31,7 @@ app.post('/save-token', async (req, res) => { } catch (error) { // saveToken 함수에서 에러가 발생한 경우에 대한 처리 - if (error.message === 'ER_DUP_ENTRY') { + if (error.code === 'ER_DUP_ENTRY') { res.status(409).send('Token already exists for this user'); } else { res.status(500).send('Internal Server Error');