Better error handling in JavaScript
How and why to use custom error types in JavaScript
6 min readAug 13, 2018
Handling errors well can be tricky. How Error() historically worked in JavaScript hasn’t made this easier, but using the Error class introduced in ES6 can be helpful