<commit_before>Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}

module Gitlab
  class API < Grape::API
    VERSION = 'v2'
    version VERSION, :using => :path

    format :json
    error_format :json
    helpers APIHelpers

    mount Users
    mount Projects
  end
end<commit_msg>return 404 when record not found<commit_after>Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}

module Gitlab
  class API < Grape::API
    VERSION = 'v2'
    version VERSION, :using => :path

    rescue_from ActiveRecord::RecordNotFound do
      rack_response({'message' => '404 Not found'}.to_json, 404)
    end

    format :json
    error_format :json
    helpers APIHelpers

    mount Users
    mount Projects
  end
end
{'fraction_non_alphanumeric': 0.11279229711141678, 'fraction_numerical': 0.015130674002751032, 'mean_word_length': 3.2325581395348837, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '7263346', 'n_tokens_mistral': 251, 'n_tokens_neox': 238, 'n_words': 67}