summaryrefslogtreecommitdiff
path: root/app/models/project_services
diff options
context:
space:
mode:
authorMike Wyatt <wyatt.mike@gmail.com>2015-12-30 00:52:56 -0400
committerMike Wyatt <wyatt.mike@gmail.com>2015-12-30 00:52:56 -0400
commit9e7a88f089323964088945829523b798ea6b78b5 (patch)
treebbb8e97c05b04ebfdbaaa588eed441259cd67946 /app/models/project_services
parent7b98d0e1a24645df802ad65911c290ad057d1422 (diff)
downloadgitlab-ce-9e7a88f089323964088945829523b798ea6b78b5.tar.gz
Better handling of errors in Asana service
[ci skip]
Diffstat (limited to 'app/models/project_services')
-rw-r--r--app/models/project_services/asana_service.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/app/models/project_services/asana_service.rb b/app/models/project_services/asana_service.rb
index ab5772356f1..cb4f6ddb3a5 100644
--- a/app/models/project_services/asana_service.rb
+++ b/app/models/project_services/asana_service.rb
@@ -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