Skip to content

Commit

Permalink
fix: err code로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
JeongSH1 committed Dec 7, 2023
1 parent 54f4092 commit b4ed587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion noti.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b4ed587

Please sign in to comment.