You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and trying to navigate to a page that throws an error using client navigation, the app throws an uncaught error and does not work as it should
What I did
I throw an error if the page pathname includes /abc, and instead of showing me the error page, the page just stays still and I see an uncaught error on the console
Just to mention, if you do the same function on a +page.js its works almost as expected, it does shows the error message but always shows error 500 instead of the error code passed in the function
Very important to mention
This bug happens only on client navigation, if I reload the page on the route that I throw an error, it works perfectly.
only if I'm trying to navigate to that page after the app is initialized the bug occur
create also a +layout.svelte and add some a tag for navigation
and add a catch-all page or just normal pages on the routes folder so the app will function
and then try to navigate to the page /abc (the one we throw an error on in +layout.js)`
and you will notice an uncaught error on the console and the page will not change
Describe the bug
When using the
error
helper from@sveltejs/kit
and trying to navigate to a page that throws an error using client navigation, the app throws an uncaught error and does not work as it should
What I did
I throw an error if the page pathname includes
/abc
, and instead of showing me the error page, the page just stays still and I see an uncaught error on the consoleJust to mention, if you do the same function on a
+page.js
its works almost as expected, it does shows the error message but always shows error 500 instead of the error code passed in the functionVery important to mention
This bug happens only on client navigation, if I reload the page on the route that I throw an error, it works perfectly.
only if I'm trying to navigate to that page after the app is initialized the bug occur
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-owrn8f?file=src/routes/+layout.js
Create a
+layout.js
and add the function belowcreate also a
+layout.svelte
and add some a tag for navigationand add a catch-all page or just normal pages on the
routes
folder so the app will functionand then try to navigate to the page
/abc
(the one we throw an error on in +layout.js)`and you will notice an uncaught error on the console and the page will not change
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: