Error in server side preloaded query crashing dev server
Whenever an error is thrown in a preloaded server side query in one of my routes, it crashes the dev server. It also is not caught by any error boundary. I found #399, which appears to be a similar issue. I am not sure whether that issue has simply reappeared, or it is erroring because I have misconfigured something (I am on the latest solid/solid router/solidstart versions).
GitHub
solidjs/solid-router
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
6 Replies
preloading is handled outside the rendering context so it can't be handled by the ErrorBoundary.
If the called function in preload is a
query
throwing should work. If its not a query adding .catch(() => void 0)
help, although there's actuall no point calling a non query.
So this works - ErrorBoundary is in app.tsx:
Thanks. It turns out I misread the issue as being for preload rather than load
Load is the predecessor of preload
For some reason this query still doesn't catch errors:
being accessed by
and
any idea why? other queries appear to catch errors properly, but these crash the dev server
Not really . Looks fine to me.
What’s error message?
It is just the original error uncaught
e.g.
then the process exits
I have messed around with it a bit and it seems to be caused by something in the query rather than how it is being called externally, but I am having trouble figuring out what that could be