Fail gracefully on DFC product import errors

This commit is contained in:
Maikel Linke
2024-10-11 11:45:34 +11:00
parent 7d2d14320f
commit 95ff0d8d4a
2 changed files with 32 additions and 0 deletions

View File

@@ -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