Skip to content

[Bug] Missing Error State Handling for API Fetch on Core Pages #595

Description

@Pranav-IIITM

Description

Currently, both the homepage (src/pages/index.tsx) and the features page (src/pages/features.tsx) rely on client-side data fetching on mount to pull dynamic content (such as the latest Podman release version from the GitHub API).

However, the Promise error handling for these fetches is incomplete. In both files, the code simply relies on fetchData().catch(console.error);.

Why This Is an Issue

If the API request fails—which is a highly common occurrence during local development due to GitHub API rate limits, or for users with strict network configurations—the component silently fails in the browser console.

Because the React component does not track this error state, the UI does not gracefully recover. It either gets stuck in a perpetual loading state or renders broken, empty data fields to the user, creating a confusing experience.

Location of Affected Code

  • src/pages/index.tsx (around line 61)
  • src/pages/features.tsx (around line 185)

Additional Context

This improves user experience significantly — instead of a broken or confusing state, users see a clear message that the data is temporarily unavailable, with the rest of the page intact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions