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.