class customError extends Error { constructor(message, code) { super(message) if (Error.captureStackTrace) { Error.captureStackTrace(this, customError); } this.code = code; } } export default customError;