summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-24 12:14:06 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-24 12:17:13 -0300
commit2986de7c8c63c0a90f750adbfd843d3b2d50e25f (patch)
tree8927f885056620cc1ec96b0296422c18ba11241f /lib
parent3c09000e18dcbf6a74ed1f749db3184e309cf081 (diff)
downloadgitlab-ce-2986de7c8c63c0a90f750adbfd843d3b2d50e25f.tar.gz
Add readable error message when remote data could not be fully imported
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/github_import/importer.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index 86b49a5021a..02ffb43d89b 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -36,7 +36,12 @@ module Gitlab
end
def handle_errors
- project.update_column(:import_error, errors.to_json) unless errors.empty?
+ return unless errors.any?
+
+ project.update_column(:import_error, {
+ message: 'The remote data could not be fully imported.',
+ errors: errors
+ }.to_json)
end
def import_labels