post queries: show full error message on error page.
This commit is contained in:
@@ -132,6 +132,8 @@ class ApplicationController < ActionController::Base
|
||||
render_error_page(410, exception, template: "static/pagination_error", message: "You cannot go beyond page #{CurrentUser.user.page_limit}.")
|
||||
when PostQuery::TagLimitError
|
||||
render_error_page(422, exception, template: "static/tag_limit_error", message: "You cannot search for more than #{CurrentUser.tag_query_limit} tags at a time.")
|
||||
when PostQuery::Error
|
||||
render_error_page(422, exception, message: exception.message)
|
||||
when RateLimiter::RateLimitError
|
||||
render_error_page(429, exception, message: "Rate limit exceeded. You're doing that too fast")
|
||||
when Rack::Timeout::RequestTimeoutException
|
||||
|
||||
Reference in New Issue
Block a user