From fcf64a2bbdd08cdd71759b80693e69c53a4d6a38 Mon Sep 17 00:00:00 2001 From: Andy Wallace Date: Fri, 4 Oct 2024 14:02:27 -0700 Subject: [PATCH] NOP-12: show "not found" page for ActionController::RoutingError the custom 404 page was only displaying when a url matched one of our routes but no item was found; urls that did not match any route result in a stock rails error page. This PR should ensure that everything gets the custom page. --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f894f618..e9f390d1 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -53,6 +53,7 @@ def cors_preflight_check rescue_from Blacklight::AccessControls::AccessDenied, with: :render_404 rescue_from Blacklight::Exceptions::RecordNotFound, with: :render_404 + rescue_from ActionController::RoutingError, with: :render_404 def render_404 render 'errors/not_found'