Lessons from opensource: Add a defensive type-safe error handler in your catch block
These lessons are picked from next.js/create-next-app open source code. In this article, you will see an unique error handler mechanims implemented in catch block.
isErrorLike function within catch block:
https://github.com/vercel/next.js/blob/canar...
ramunarasinga.hashnode.dev2 min read