libfb-js icon indicating copy to clipboard operation
libfb-js copied to clipboard

How can I use the built-in custom errors?

Open Ptomerty opened this issue 5 years ago • 0 comments

I am rather new to NodeJS, so forgive me for any basic errors.

That said, I've been trying to see if a thrown error is of type AttachmentNotFoundError. However, I don't think this error type is actually exported anywhere, and thus any attempt to use instanceof AttachmentNotFoundError results in TypeError: Right-hand side of 'instanceof' is not an object or ReferenceError: AttachmentNotFoundError is not defined.

Is there any way I can import this from src/types/errors? Thanks!

Ptomerty avatar Apr 08 '20 04:04 Ptomerty