diff --git a/app/models/csv_importer.rb b/app/models/csv_importer.rb index 66297b13c..f95fae8f2 100644 --- a/app/models/csv_importer.rb +++ b/app/models/csv_importer.rb @@ -64,7 +64,7 @@ class CsvImporter def cropbot @cropbot = Member.find_by!(login_name: 'cropbot') unless @cropbot @cropbot - rescue + rescue StandardError raise "cropbot account not found: run rake db:seed" end end diff --git a/db/seeds.rb b/db/seeds.rb index a1477fbe6..a91c19048 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -65,7 +65,7 @@ def load_test_users # rubocop:disable Metrics/AbcSize source_path = Rails.root.join('db', 'seeds') begin suburb_file = File.open("#{source_path}/suburbs.csv") - rescue + rescue StandardError puts "Warning: unable to open suburbs.csv" end