Skip to content

[BUG] NotificationBell silently ignores notification API failures #1659

@joshnajojo12

Description

@joshnajojo12

Problem

The NotificationBell component currently swallows notification-related API failures without providing any feedback to the user.

Examples:

catch {
  // silent fail
}

and

fetch("/api/notifications", { method: "PATCH" }).catch(() => {});

When these requests fail:

  • Users are not informed that notifications could not be loaded.
  • Notification data may become stale.
  • Read/unread status can become inconsistent if the mark-as-read request fails.
  • Failures become difficult to identify and debug.

Current Behavior

  • Failed notification fetch requests are silently ignored.
  • Failed mark-as-read requests are silently ignored.
  • Users receive no indication that an error occurred.

Expected Behavior

The component should provide clear feedback when notification-related requests fail.

The UI should distinguish between:

  1. Loading notifications
  2. No notifications available
  3. Failed notification requests

Mark-as-read failures should also be handled gracefully.

Proposed Solution

  • Add a dedicated error state for failed notification fetch requests.
  • Display a user-friendly error message when notifications cannot be loaded.
  • Handle mark-as-read request failures appropriately.
  • Avoid silently swallowing API errors.
  • Preserve the existing notification functionality and user experience.

Benefits

  • Improves reliability and user experience.
  • Prevents confusion caused by stale notification data.
  • Makes notification behavior more predictable.
  • Provides better visibility into API failures.

File

src/components/NotificationBell.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersgssoc26GSSoC 2026 contributionlevel:beginnerGSSoC: Beginner difficulty (20 pts)type:bugGSSoC type bonus: bug fix

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions