Better handling of errors in Asana service
[ci skip]
This commit is contained in:
parent
7b98d0e1a2
commit
9e7a88f089
1 changed files with 8 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue