<commit_before>class ApplicationController < ActionController::Base
  protect_from_forgery

  rescue_from 'Mongo::ConnectionFailure' do |exception|
    render :template => "errors/connection_failure"
  end
end
<commit_msg>Do it properly<commit_after>class ApplicationController < ActionController::Base
  protect_from_forgery
  
  rescue_from Mongo::ConnectionFailure, :with => :database_failure
  
  protected
    def database_failure
      render :template => "errors/connetion_failure", :status => 500
    end
end

{'fraction_non_alphanumeric': 0.07930367504835589, 'fraction_numerical': 0.005802707930367505, 'mean_word_length': 5.556962025316456, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5204434', 'n_tokens_mistral': 146, 'n_tokens_neox': 142, 'n_words': 33}