Create an error with custom properties in Node.