Bug Report
/mentorship/ad-hoc-timeline returns a 500 whenever the backend is unreachable, because the page has no static fallback (its sibling long-term page does).
src/lib/api.ts:60-71 — the pageData fallback map has no 'mentorship/ad-hoc-timeline' key, and responses/adHocTimeLine.json exists but is never imported.
src/pages/mentorship/ad-hoc-timeline.tsx:96-103 — getServerSideProps returns props.data = undefined when the fetch fails.
Reproduction
Backend down/misconfigured → fetchData returns { data: undefined } → getServerSideProps returns data: undefined → Next.js throws "Error serializing .data" → 500 page. The long-term-timeline page falls back gracefully in the same situation.
Severity
Medium
Potential Risk
- The ad-hoc timeline page hard-fails during any backend outage, instead of degrading to static content.
Suggested Fix
- Add a
'mentorship/ad-hoc-timeline' entry to the fallback map wired to responses/adHocTimeLine.json.
- Guard
getServerSideProps so data is never undefined (return the fallback or a safe default).
- Add a test simulating a failed fetch and asserting the fallback renders.
Bug Report
/mentorship/ad-hoc-timelinereturns a 500 whenever the backend is unreachable, because the page has no static fallback (its sibling long-term page does).src/lib/api.ts:60-71— thepageDatafallback map has no'mentorship/ad-hoc-timeline'key, andresponses/adHocTimeLine.jsonexists but is never imported.src/pages/mentorship/ad-hoc-timeline.tsx:96-103—getServerSidePropsreturnsprops.data = undefinedwhen the fetch fails.Reproduction
Backend down/misconfigured →
fetchDatareturns{ data: undefined }→getServerSidePropsreturnsdata: undefined→ Next.js throws "Error serializing.data" → 500 page. The long-term-timeline page falls back gracefully in the same situation.Severity
Medium
Potential Risk
Suggested Fix
'mentorship/ad-hoc-timeline'entry to the fallback map wired toresponses/adHocTimeLine.json.getServerSidePropssodatais neverundefined(return the fallback or a safe default).