-
I my login module I have this code snippet in my +page.server.ts
When I single step in the debugger and step over "throw redirect", it will go into the catch block instead of redirecting.
so unless I have done something wrong somewhere, I think the problem still exists. There are more places where throw redirect have the same behavior. Is there anyone that have the same experience or any ideas on what could cause this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It seems to work as intended. You throw something in try block and then catch block catches it. Why would you even want to throw redirect in a try block? What's the use case? |
Beta Was this translation helpful? Give feedback.
-
I am seeing this bug resurface as well. The temporary fix that I read about seems usually work: stop your server, delete the node-modules directory, and then start it up. |
Beta Was this translation helpful? Give feedback.
It seems to work as intended. You throw something in try block and then catch block catches it.
Why would you even want to throw redirect in a try block? What's the use case?