class ViewModel::ErrorView

ViewModel for rendering ViewModel::AbstractErrors

def serialize_exception(json, serialize_context:)

Ruby exceptions should never be serialized in production
def serialize_exception(json, serialize_context:)
  if ViewModel::Config.show_cause_in_error_view
    super
  else
    json.exception nil
  end
end