From: Tom Hughes Date: Fri, 27 Oct 2017 18:21:19 +0000 (+0100) Subject: Update for ActionView::Template::Error change X-Git-Tag: live~3255 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cea455d3900445160bab2cf878ce4662410c7ca8 Update for ActionView::Template::Error change --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0988fcdf8..5905b3759 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -366,7 +366,7 @@ class ApplicationController < ActionController::Base yield end rescue ActionView::Template::Error => ex - ex = ex.original_exception + ex = ex.cause if ex.is_a?(Timeout::Error) || (ex.is_a?(ActiveRecord::StatementInvalid) && ex.message =~ /execution expired/)