Better handling of errors in Asana service

[ci skip]
This commit is contained in:
Mike Wyatt 2015-12-30 00:52:56 -04:00
parent 7b98d0e1a2
commit 9e7a88f089

View file

@ -111,17 +111,16 @@ http://app.asana.com/-/account_api'
begin
task = Asana::Task.find_by_id(client, taskid)
rescue Exception => e
puts e.message
puts e.backtrace.inspect
task.add_comment(text: "#{push_msg} #{message}")
if tuple[0]
task.update(completed: true)
end
rescue => e
Rails.logger.error(e.message)
Rails.logger.error(e.backtrace.join("\n"))
next
end
task.add_comment(text: "#{push_msg} #{message}")
if tuple[0]
task.update(completed: true)
end
end
end
end