{"size": 439, "ext": "js", "max_stars_repo_path": "packages/client/middleware/error-handler.js", "max_stars_repo_name": "mintsweet/parctice", "max_stars_repo_stars_event_min_datetime": "2018-04-30T17:15:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-23T02:36:26.000Z", "max_issues_repo_path": "packages/client/middleware/error-handler.js", "max_issues_repo_name": "mintsweet/parctice", "max_issues_repo_issues_event_min_datetime": "2019-06-04T13:36:50.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-11T11:37:43.000Z", "max_forks_repo_path": "packages/client/middleware/error-handler.js", "max_forks_repo_name": "mintsweet/parctice", "max_forks_repo_forks_event_min_datetime": "2018-07-01T13:18:31.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-21T05:17:16.000Z"}
{"max_stars_count": 341, "max_issues_count": 2, "max_forks_count": 40, "avg_line_length": 19.9545454545, "max_line_length": 42, "alphanum_fraction": 0.569476082}
const logger = require('../utils/logger');

exports.handle404 = (_, res) => {
  res.render('pages/exception', {
    title: '404',
    errorTitle: '抱歉！你访问的页面失联了',
    errorMsg: [
      '网址有错误 - 请检查地址是否完整或存在多余字符。',
      '网址已失效 - 可能页面已删除。',
    ],
  });
};

exports.handle500 = (err, _, res) => {
  logger.error(err);
  res.render('pages/exception', {
    title: '500',
    errorTitle: '抱歉！当前页面暂时无法访问',
    errorMsg: [err.message],
  });
};
