Exception: Chewy::ImportFailed
- Defined in:
- lib/chewy/errors.rb
Instance Method Summary collapse
-
#initialize(type, import_errors) ⇒ ImportFailed
constructor
A new instance of ImportFailed.
Constructor Details
#initialize(type, import_errors) ⇒ ImportFailed
Returns a new instance of ImportFailed.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/chewy/errors.rb', line 21 def initialize(type, import_errors) = "Import failed for `#{type}` with:\n" import_errors.each do |action, action_errors| << " #{action.to_s.humanize} errors:\n" action_errors.each do |error, documents| << " `#{error}`\n" << " on #{documents.count} documents: #{documents}\n" end end super() end |