Commit 9e7a88f0 authored by Mike Wyatt's avatar Mike Wyatt

Better handling of errors in Asana service

[ci skip]
parent 7b98d0e1
...@@ -111,17 +111,16 @@ http://app.asana.com/-/account_api' ...@@ -111,17 +111,16 @@ http://app.asana.com/-/account_api'
begin begin
task = Asana::Task.find_by_id(client, taskid) task = Asana::Task.find_by_id(client, taskid)
rescue Exception => e task.add_comment(text: "#{push_msg} #{message}")
puts e.message
puts e.backtrace.inspect if tuple[0]
task.update(completed: true)
end
rescue => e
Rails.logger.error(e.message)
Rails.logger.error(e.backtrace.join("\n"))
next next
end end
task.add_comment(text: "#{push_msg} #{message}")
if tuple[0]
task.update(completed: true)
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment