code: function handleError(req, res, err) {
      switch (err.name) {
        case 'NotFoundError':
          render(req, res, 'error', err, {status: 404});
          break;
        default:
          render(req, res, 'error', err, {status: 500});
      }
    }
docs: Render an error page