Catch Error Type In Bluebird Not Working
I have a custom error class: class NetworkError extends Error { constructor() { super('Network Error'); this.name = 'NetworkError'; } } And I want to handle it specifi
Solution 1:
As @loganfsmyth suggested in the question comments, it's a Babel limitation. This answer does the trick:
Why doesn't instanceof work on instances of Error subclasses under babel-node?
Post a Comment for "Catch Error Type In Bluebird Not Working"