is.error() does not recognise sub-classes of Error as errors
Opened this issue · 0 comments
bbusschots-mu commented
I have custom error classes in my code that are properly sub-classed from Error using the very convenient es6-error
NPM module. Errors generated with these sub-classes are recognised as instances of Error by JavaScript, i.e. myError instanceof Error
evaluates to true
. However, is.error()
evaluates to false. Surely anything that gets true
for instanceof Error
should be recognised as an error by is.error()
?