mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Don’t log an error when rendering a 404
Currently, in the list controller, when encountering an unsafe redirect error, a 404 is rendered. The problem is that it’s done in a way that it also logs a fatal error (because a `Discourse::NotFound` exception was raised inside a `rescue_from` block). This patch addresses that issue by simply rendering a 404 without raising any error.
This commit is contained in:

committed by
Loïc Guitaut

parent
4c0af24173
commit
bf3d8a0a94
@ -50,7 +50,7 @@ class ListController < ApplicationController
|
||||
].flatten
|
||||
|
||||
rescue_from ActionController::Redirecting::UnsafeRedirectError do
|
||||
raise Discourse::NotFound
|
||||
rescue_discourse_actions(:not_found, 404)
|
||||
end
|
||||
|
||||
# Create our filters
|
||||
|
Reference in New Issue
Block a user