This method is only available on newer versions. The first available version (v8.1.1) is shown here.
use(middleware)
Add a middleware to the error context stack.
# File activesupport/lib/active_support/error_reporter.rb, line 304 def use(middleware) unless middleware.respond_to?(:call) raise ArgumentError, "Error context middleware must respond to #call" end @stack << middleware end