<commit_before>var req = require('request');
var marked = require('marked');

module.exports = function (request, reply) {
  var opts = {
    user: request.auth.credentials
  };

  var timer = { start: Date.now() };

  var policy = request.params.policy || 'README';

  request.server.methods.corp.getPolicy(policy, function (err, content) {

    if (err) {
      return request.server.methods.errors.showError(request, reply)(err, 404, "could not find policy " + policy, opts);
    }

    opts.md = content;

    request.timing.page = 'policy-' + policy;
    request.metrics.metric({name: 'policy-' + policy});

    return reply.view('company/corporate', opts);
  });
}<commit_msg>Removed another use of showError(); cleaned up unused code.<commit_after>
module.exports = function (request, reply) {
  
  var opts = { user: request.auth.credentials };
  var policy = request.params.policy || 'README';

  request.server.methods.corp.getPolicy(policy, function (err, content) {

    if (err) {
      request.logger.warn('could not find policy ' + policy);
      reply.view('errors/not-found', opts).code(404);
      return;
    }

    opts.md = content;

    request.timing.page = 'policy-' + policy;
    request.metrics.metric({name: 'policy-' + policy});

    return reply.view('company/corporate', opts);
  });
}
{'fraction_non_alphanumeric': 0.1574144486692015, 'fraction_numerical': 0.0045627376425855515, 'mean_word_length': 3.461016949152542, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3490622', 'n_tokens_mistral': 424, 'n_tokens_neox': 396, 'n_words': 95}