You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Node.js SystemError doesn't work well with Deno.errors, for example, when a file is not found, Node.js produces a SystemError with a code of ENOENT which equates to a Deno.errors.NotFound, but err instanceof Deno.errors.NotFound works under Deno, but fails under Node.js.
We should consider providing a [Symbol.hasInstance] implementation for a special class of Deno.errors in the shim that would do further analysis on the Node.js error instances and see if it maps back to a Deno error, so instanceof operator can work.
The text was updated successfully, but these errors were encountered:
Currently Node.js
SystemError
doesn't work well withDeno.errors
, for example, when a file is not found, Node.js produces aSystemError
with a code ofENOENT
which equates to aDeno.errors.NotFound
, buterr instanceof Deno.errors.NotFound
works under Deno, but fails under Node.js.We should consider providing a
[Symbol.hasInstance]
implementation for a special class ofDeno.errors
in the shim that would do further analysis on the Node.js error instances and see if it maps back to a Deno error, soinstanceof
operator can work.The text was updated successfully, but these errors were encountered: