class ViewModel::ErrorView::ExceptionDetailView

def serialize_view(json, serialize_context: nil)

def serialize_view(json, serialize_context: nil)
  json.set! :class, exception.class.name
  json.backtrace exception.backtrace
  json.cause do
    cause = exception.cause
    next json.null! unless cause
    json.set! :class, cause.class.name
    json.backtrace cause.backtrace
  end
  json.context do
    next json.null! unless exception.respond_to?(:to_honeybadger_context)
    json.merge! exception.to_honeybadger_context
  end
end