]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Merge pull request #2624 from francois2metz/diary-entry
[rails.git] / app / controllers / application_controller.rb
index bee5e8169a4709d05f5d36ead2c6924a03f2db6a..0099845942e80326ac8c0145d25986c551427e39 100644 (file)
@@ -10,6 +10,7 @@ class ApplicationController < ActionController::Base
   around_action :better_errors_allow_inline, :if => proc { Rails.env.development? }
 
   attr_accessor :current_user
+
   helper_method :current_user
 
   private
@@ -185,6 +186,8 @@ class ApplicationController < ActionController::Base
 
   def api_call_handle_error
     yield
+  rescue ActionController::UnknownFormat
+    head :not_acceptable
   rescue ActiveRecord::RecordNotFound => e
     head :not_found
   rescue LibXML::XML::Error, ArgumentError => e