Skip to content

[BUG] Add proper error handling for fetch calls in Feedback and NewsletterSubscribe components #4686

@sarthakNITT

Description

@sarthakNITT

Describe the bug.

Both Feedback.tsx and NewsletterSubscribe.tsx use fetch() without a .catch() block or try/catch wrapper. This causes unhandled promise rejections, and any network failure results in the UI not updating properly or potentially crashing.

Expected behavior

Fetch requests should gracefully handle network errors and update the component state accordingly (e.g., show error UI). The app should never crash due to missing error handling.

Screenshots

.

How to Reproduce

  1. Open the page with the Feedback or Newsletter Subscribe form.
  2. Turn off your internet or simulate offline mode.
  3. Submit the form.
  4. Notice nothing happens and no error is shown.

🖥️ Device Information [optional]

  • Operating System (OS):
  • Browser:
  • Browser Version:

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions