Skip to content

fix(router): preserve statusCode of loadable notFound pages - #166

Merged
dangreen merged 1 commit into
mainfrom
fix/router-loadable-not-found-status
Jul 15, 2026
Merged

fix(router): preserve statusCode of loadable notFound pages#166
dangreen merged 1 commit into
mainfrom
fix/router-loadable-not-found-status

Conversation

@dangreen

Copy link
Copy Markdown
Member

getViewRefGetter returned the loadable ref loader directly and dropped the extra page module fields, so notFound(loadable(...)) rendered with status 200 instead of 404.

  • sync wrapper merges the extra module fields over the loaded ref
  • unit test: notFound(loadable(...)) keeps statusCode: 404 before and after the module loads

`getViewRefGetter` returned the loadable ref loader directly and dropped
the extra page module fields, so `notFound(loadable(...))` rendered with
status 200 instead of 404.
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.86%. Comparing base (b6ce87b) to head (d04eef5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #166   +/-   ##
=======================================
  Coverage   83.86%   83.86%           
=======================================
  Files         138      138           
  Lines        2968     2969    +1     
  Branches      560      560           
=======================================
+ Hits         2489     2490    +1     
  Misses        340      340           
  Partials      139      139           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dangreen
dangreen merged commit 40da5a6 into main Jul 15, 2026
10 checks passed
@dangreen
dangreen deleted the fix/router-loadable-not-found-status branch July 15, 2026 10:47
This was referenced Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant