/**
 * notFound middleware
 * - Returns a consistent 404 JSON response.
 */

function notFoundHandler(_req, res) {
  return res.status(404).json({
    error: 'Not Found',
    message: 'Route does not exist'
  });
}

module.exports = { notFoundHandler };

