diff --git a/app/models/mixins/process_tasks_mixin.rb b/app/models/mixins/process_tasks_mixin.rb index c91ce8655df5..879fcc240d1c 100644 --- a/app/models/mixins/process_tasks_mixin.rb +++ b/app/models/mixins/process_tasks_mixin.rb @@ -121,15 +121,10 @@ def invoke_api_tasks(api_client, remote_options) resource_ids.each do |id| begin obj = collection.find(id) - rescue ManageIQ::API::Client::ResourceNotFound => err - _log.error(err.message) - else _log.info("Invoking task #{action} on collection #{collection_name}, object #{obj.id}, with args #{post_args}") - begin - obj.send(action, post_args) - rescue NoMethodError => err - _log.error(err.message) - end + obj.send(action, post_args) + rescue NoMethodError, ManageIQ::API::Client::ResourceNotFound => err + _log.error(err.message) end end else