Open madaxen86 opened 8 months ago
Yeah this one is odd.. codesandbox is not being particularly helpful to me because they have a limit now on drafts unless I pay so I can't play with this much other than confirm the reproduction and that it isn't the same as the other issue. Beyond that this one is very specific to loading on the page... so there probably is an issue related to cache + hydration. I will try to look into this more in a bit.
I added a stackblitz - here the error is on the home page because stackblitz reloads o on the home route when reloading the url. Added a Github repo so you can dig into it. Thanks a lot and thanks for this amazing framework. It is such a pleasure to work with SolidJs.
Describe the bug
May be related to #374 When the function that is passed to the routes load() function throws an error or rejected promise, the error will be passed to the result primitive as a "successful" value if the page is refreshed and then clicked on a link to the current page (please check the video).
Your Example Website or App
https://github.com/madaxen86/solid-router-cache-load-bug.git Stackblitz -> Note: Unlike in the attached video the error now is on the index route.
Steps to Reproduce the Bug or Issue
Expected behavior
The error should always be picked up by the ErrorBoundary and never passed to the primitive returned by the createAsync function.
Screenshots or Videos
https://github.com/solidjs/solid-router/assets/59310516/d855df9c-35a2-4d46-b387-7c64a1134f56
Platform
@solidjs/router: 0.12.4 @solidjs/start: 0.6.0
Additional context
No response