DEV Community

Discussion on: Return your errors instead of throwing them in typescript

Collapse
 
pgross41 profile image
Patrick Gross

Also is there a reason to use a string in the Err function and pass e.message instead of just accepting unknown and passing it the whole error? You lose your stack trace and possibly other things if you don't keep the original error.