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
Hi, could someone explain why the redirect method is thrown and not just returned. According to MDN, throw is intended for user-defined exceptions. However, when I am redirecting, eg after creating a new entity in the db and then redirecting to the details view, that is the intended outcome and not an exception. Thanks for any insights.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, could someone explain why the redirect method is thrown and not just returned. According to MDN, throw is intended for user-defined exceptions. However, when I am redirecting, eg after creating a new entity in the db and then redirecting to the details view, that is the intended outcome and not an exception. Thanks for any insights.
Beta Was this translation helpful? Give feedback.
All reactions