Skip to content
Snippets Groups Projects
Commit 9e7a88f0 authored by Mike Wyatt's avatar Mike Wyatt
Browse files

Better handling of errors in Asana service

[ci skip]
parent 7b98d0e1
No related branches found
No related tags found
2 merge requests!2302Better support for referencing and closing issues in asana_service.rb (by @mikew1),!2111Better support for referencing and closing issues in asana_service.rb
Loading
@@ -111,17 +111,16 @@ http://app.asana.com/-/account_api'
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment