containers / containers/podman.io
[Bug] Missing Error State Handling for API Fetch on Core Pages
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 188
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 11
Description
## 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the client-side fetch logic around the noted locations in src/pages/index.tsx and src/pages/features.tsx, including the fetchData().catch(console.error) calls. Trace the existing loading and content states, then make the failed-request state visible while leaving the rest of each page intact. Done means API failures show a clear temporary-unavailability message instead of a stuck or broken data area.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100