code: function _renderError(err, request) {
    const error = Boom.boomify(err);
    let status = error.output.statusCode;
    let rendered;
    let errorFile;
  
    if (this.local && status !== 404) {
      errorFile = resolve(dashboard.paths.views, 'errors', 'trace.html');
      rendered = Template.fromFile(errorFile).render({
        error: {
          status,
          title: error.output.payload.error,
          message: error.message,
          stack: error.stack,
        },
        request,
      });
    } else {
      const siteFile = resolve(this.paths.www, '_error.html');
      status = status === 404 ? 404 : 500;
      errorFile = status === 404 && fs.existsSync(siteFile) ? siteFile : resolve(dashboard.paths.views, 'errors', `${status}.html`);
      rendered = fs.readFileSync(errorFile, 'utf-8');
    }
  
    if (status !== 404) {
      Logger.extra(error.stack);
    }
  
    return [status, rendered];
  }
docs: @private
  
  Renders error, first by looking in the site directory,
  then falling back to Vapid own error template.
  
  @param {Error} err
  @param {Object} request
  @return {[status, rendered]} HTTP status code, and rendered HTML