diff --git a/app/services/app_catalog_manager/update_metadata.rb b/app/services/app_catalog_manager/update_metadata.rb index 4530ae3..d78c5d8 100644 --- a/app/services/app_catalog_manager/update_metadata.rb +++ b/app/services/app_catalog_manager/update_metadata.rb @@ -45,8 +45,12 @@ module AppCatalogManager filename = "#{attachment_name}.png" key = "web_apps/#{@app.id}/icons/#{attachment_name}.png" - tempfile = Down.download(download_url) - @app.send(attachment_name).attach(key: key, io: tempfile, filename: filename) + begin + tempfile = Down.download(download_url) + @app.send(attachment_name).attach(key: key, io: tempfile, filename: filename) + rescue Down::NotFound + Rails.logger.warn "Icon download failed: NotFound error for #{download_url}" + end end end end