Please, please, please do this. One of my biggest JS pet peeves is when people catch errors then throw a new error without including the cause. You’re shooting yourself in the foot.
JS pro tip: Add { cause } to errors. Makes debugging and inspection way easier 🔍 developer.mozilla.org/en-US/docs/W...
4 reposts49 likes