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
If the request status 404 -> it throws error 404
Thats works well
But if the user goes to another page from the menu and clicks on this page again svelte kit fetch in browser, istead of ssr
Throw error method is not supported in the browser, and everything returns an error of 500
Router is switched to false
Important note: if page throws error (404) the router switches to true then no page is reloaded again until refresh in the browser
Reproduction
console.log(await response.status); // return code server 404, but after using the navigation - return 404 in browser console
if(await response.status !== 200){
throw error (response.status);
}
Logs
client.js:362 <Error> was created with unknown prop 'data'
client.js:362 <Error> was created with unknown prop 'errors'
System Info
@sveltejs/kit@1.0.0-next.442
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered:
Ohyenno
changed the title
Fatal error on 404 - problem with throws error
Fatal error on 404 - problem with Throw error
Aug 26, 2022
Describe the bug
+page.ts has a load function with a fetch request
If the request status 404 -> it throws error 404
Thats works well
But if the user goes to another page from the menu and clicks on this page again svelte kit fetch in browser, istead of ssr
Throw error method is not supported in the browser, and everything returns an error of 500
Router is switched to false
Important note: if page throws error (404) the router switches to true then no page is reloaded again until refresh in the browser
Reproduction
console.log(await response.status); // return code server 404, but after using the navigation - return 404 in browser console
if(await response.status !== 200){
throw error (response.status);
}
Logs
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: