From d7fce22ee5116b6ecf27103eb9f6a733224b0b16 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 13 Aug 2019 21:30:20 -0500 Subject: [PATCH] application controller: rescue Post::SearchError. Raised when a member does a >2 tag search. --- app/controllers/application_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index aabb1f5c8..143efe5a4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -86,6 +86,8 @@ class ApplicationController < ActionController::Base render_error_page(406, exception, message: "#{request.format.to_s} is not a supported format for this page", format: :html) when Danbooru::Paginator::PaginationError render_error_page(410, exception) + when Post::SearchError + render_error_page(422, exception) when NotImplementedError render_error_page(501, exception, message: "This feature isn't available: #{exception.message}") when PG::ConnectionBad