From f3abaeac39db4c2001bcaaa663ff913798472eeb Mon Sep 17 00:00:00 2001 From: mhmmdafif Date: Tue, 6 Jan 2026 16:28:37 +0700 Subject: [PATCH] repair: change error update is_read true to success --- services/notification_error.service.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/notification_error.service.js b/services/notification_error.service.js index dcabf30..afe9786 100644 --- a/services/notification_error.service.js +++ b/services/notification_error.service.js @@ -150,8 +150,9 @@ class NotificationService { const notification = Array.isArray(dataExist) ? dataExist[0] : dataExist; if (notification.is_read === true) { - throw new ErrorHandler(400, "Notification has already been read"); - } + return {success: true, message:"Notification has already been read"}; + } + if (!notification.is_read) { const updateStatus = await updateNotificationErrorDb(