mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: stop logging every time invalid params are sent
Previously we were logging warning for invalid encoded params, this can cause a log flood
This commit is contained in:
@ -252,7 +252,11 @@ class ApplicationController < ActionController::Base
|
||||
if show_json_errors
|
||||
# HACK: do not use render_json_error for topics#show
|
||||
if request.params[:controller] == 'topics' && request.params[:action] == 'show'
|
||||
return render status: status_code, layout: false, plain: (status_code == 404 || status_code == 410) ? build_not_found_page(status_code) : message
|
||||
return render(
|
||||
status: status_code,
|
||||
layout: false,
|
||||
plain: (status_code == 404 || status_code == 410) ? build_not_found_page(status_code) : message
|
||||
)
|
||||
end
|
||||
|
||||
render_json_error message, type: type, status: status_code
|
||||
|
Reference in New Issue
Block a user