diff options
author | Go MAEDA <maeda@farend.jp> | 2021-05-28 03:58:01 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-05-28 03:58:01 +0000 |
commit | 66fc9f463dbca69529df106338cafcc46f5fa115 (patch) | |
tree | 888a9a4b8765e62e85bce9a8f244902547607b12 /app/controllers/application_controller.rb | |
parent | 7b2fdc771b6858f646ac16b93266392c0a945531 (diff) | |
download | redmine-66fc9f463dbca69529df106338cafcc46f5fa115.tar.gz redmine-66fc9f463dbca69529df106338cafcc46f5fa115.zip |
Gracefully handle invalid query parameters for custom fields (#35312).
Patch by Holger Just.
git-svn-id: http://svn.redmine.org/redmine/trunk@21012 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b5644e89d..f907b1159 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -725,6 +725,13 @@ class ApplicationController < ActionController::Base render_error l(:error_query_statement_invalid) end + def query_error(exception) + Rails.logger.debug "#{exception.class.name}: #{exception.message}" + Rails.logger.debug " #{exception.backtrace.join("\n ")}" + + render_404 + end + # Renders a 204 response for successful updates or deletions via the API def render_api_ok render_api_head :no_content |