From 832da034a6855b94eb5eefd3b3dc4fb8fc9f78a6 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 3 Jun 2013 16:07:18 +0100 Subject: For non-HTML requests, just return the response code for now. --- app/controllers/application_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2615b61f2..d1d702616 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -142,7 +142,10 @@ class ApplicationController < ActionController::Base ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver @status = 500 end - render :template => "general/exception_caught", :status => @status + respond_to do |format| + format.html{ render :template => "general/exception_caught", :status => @status } + format.any{ render :nothing => true, :status => @status } + end end def local_request? -- cgit v1.2.3