Skip to content
Snippets Groups Projects
Commit b7caeaa9 authored by John Harris's avatar John Harris
Browse files

fix: log_rescued_responses not available in rails 6

parent 102cef7b
No related branches found
Tags 1.5.1
No related merge requests found
Pipeline #44641 passed
......@@ -11,7 +11,8 @@ module ActionDispatch
undef_method :log_error
def log_error(request, wrapper)
return if !log_rescued_responses?(request) && wrapper.rescue_response?
# log_rescued_responses? is a rails7 feature, but this gem is also used on rails6. Check for its existence.
return if respond_to?('log_rescued_responses?') && !log_rescued_responses?(request) && wrapper.rescue_response?
ActiveSupport::Deprecation.silence do
ActionController::Base.logger.fatal(wrapper.exception)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment