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
I am trying to throw an error in a page's +page.js file. In this simple example I am using the status code returned from an API which in this example should be 404. In +error.svelte I am displaying the error status using $page.status which works fine when you first load the page; but always returns 500 when you navigate from and then back to the page. $page.error.status works consistently though.
I am not sure if that's a bug or $page.status is different than $page.error.status for some reason?
Describe the bug
I am trying to throw an error in a page's +page.js file. In this simple example I am using the status code returned from an API which in this example should be 404. In +error.svelte I am displaying the error status using $page.status which works fine when you first load the page; but always returns 500 when you navigate from and then back to the page. $page.error.status works consistently though.
I am not sure if that's a bug or $page.status is different than $page.error.status for some reason?
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-bdr4bj?file=src/routes/+error.svelte
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: