Add better error page for database timeouts.

This commit is contained in:
evazion
2019-12-16 13:38:06 -06:00
parent 3d03de1c52
commit 82564355e6
3 changed files with 57 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ class ApplicationController < ActionController::Base
def rescue_exception(exception)
case exception
when ActiveRecord::QueryCanceled
render_error_page(500, exception, message: "The database timed out running your query.")
render_error_page(500, exception, template: "static/search_timeout", message: "The database timed out running your query.")
when ActionController::BadRequest
render_error_page(400, exception)
when SessionLoader::AuthenticationFailure