fix: improve error handling in notifications and organization settings for better user feedback

This commit is contained in:
Usman Baig
2026-02-16 20:34:35 +01:00
parent 4a48945486
commit 56b99dfcef
2 changed files with 4 additions and 3 deletions

View File

@@ -99,8 +99,8 @@ export default function NotificationsPage() {
setNotifications((prev) => prev.map((n) => ({ ...n, read: true })))
setUnreadCount(0)
toast.success('All notifications marked as read')
} catch {
toast.error(getAuthErrorMessage(new Error('Failed to mark all as read')))
} catch (err) {
toast.error(getAuthErrorMessage(err as Error) || 'Failed to mark all as read')
}
}