text: const logger = require('./logger');
  
  function notFound(req, res, next) {
      res.status(404);
      const error = new Error(`🔍 - Not Found - ${req.originalUrl}`);
      next(error);
  }
  
  
  function errorHandler(err, req, res, next) {
      const statusCode = res.statusCode !== 200 ? res.statusCode : 500;
      res.status(statusCode);
      logger.error(err.message);
      res.send(err.message);
  }
  
  module.exports = {
      notFound,
      errorHandler
  };