application controller: rescue Post::SearchError.

Raised when a member does a >2 tag search.
This commit is contained in:
evazion
2019-08-13 21:30:20 -05:00
parent e70cae457d
commit d7fce22ee5

View File

@@ -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