Module: Atatus::Spies::ActionDispatchSpy::Ext Private

Defined in:
lib/atatus/spies/action_dispatch.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#render_exception(request, exception_or_wrapper) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/atatus/spies/action_dispatch.rb', line 27

def render_exception(request, exception_or_wrapper)
  context = Atatus.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

  Atatus.report(exception, context: context, handled: false)
  super(request, exception_or_wrapper)
end