I read about try catch(e if e instanceof ...) blocks on MDN, however, upon trying it in Node.js, I get a SyntaxError: Unexpected token if.
If this doesn't work, is there another way to catch specific exceptions, instead of everything that might occur?