module ElasticAPM::Spies::ActionDispatchSpy::Ext

@api private

Public Instance Methods

render_exception(request, exception_or_wrapper) click to toggle source
Calls superclass method
# File lib/elastic_apm/spies/action_dispatch.rb, line 27
def render_exception(request, exception_or_wrapper)
  context = ElasticAPM.build_context(
    rack_env: request, for_type: :error
  )
  exception =
    if exception_or_wrapper.is_a?(ActionDispatch::ExceptionWrapper)
      exception_or_wrapper.exception
    else
      exception_or_wrapper
    end
  ElasticAPM.report(exception, context: context, handled: false)

  super(request, exception_or_wrapper)
end