mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-30 06:31:16 +00:00
Fail gracefully on DFC product import errors
This commit is contained in:
@@ -38,6 +38,11 @@ module Admin
|
||||
end
|
||||
|
||||
@count = imported.compact.count
|
||||
rescue Faraday::Error,
|
||||
Addressable::URI::InvalidURIError,
|
||||
ActionController::ParameterMissing => e
|
||||
flash[:error] = e.message
|
||||
redirect_to admin_product_import_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user