You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 23, 2021. It is now read-only.
Attempting to import a spreadsheet with incorrect headers is detected in the gem's load_header method but it does a raise error which stops the import process dead unless I wrap the import call in a rescue block with:
begin
UserImporter.import(file.path, extension: :csv)
rescue => e
puts e.message
end
This makes every call to import quite verbose and unnecessary when there is already an elegant :import_failed handler.
Maybe it would be better to fire the :import_failed event when load_header fails? This would allow me to handle the error in the same way as I handle other errors like row validations.