fix: home page reports a 500 when the subgraph returns no data
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 26
- Avg merge
- 11h 58m
- Merged PRs (30d)
- 16
Description
`pages/index.tsx:316-318` renders Next's error component for any data failure:
```jsx
if (hadError) {
return ;
}
```
The HTTP response is 200 — `getStaticProps` catches the failure and returns `hadError` — but the page paints **"500 Internal Server Error"**. So a subgraph that is unreachable, erroring, or serving an empty deployment presents to users as a broken server, and to anyone debugging as an HTTP status that never appears in the logs.
Observed while the configured subgraph returned `protocol: null`: every route logged 200, the gateway returned 200, and the page still showed 500.
## Fix
Distinguish "our server failed" from "the data source is unavailable". The latter deserves a degraded or empty state — the banner from #733 already exists for this — rather than a server-error page.
Needs a design decision on what the home page shows when the subgraph has nothing, so it is more than a copy change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pages/index.tsx:316-318 and trace getStaticProps's hadError path. Review the existing banner from #733 and decide the home-page degraded or empty state for an unreachable, failing, or empty subgraph. Done when these cases no longer render the 500 error component and the resulting behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100