summaryrefslogtreecommitdiff
path: root/lib/gitlab/bitbucket_import/importer.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-01-22 13:00:00 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-01-26 10:56:22 -0200
commitb58a2e30b214ffc98f492aab88137cc3fd48355d (patch)
tree7a6141d9cd107d1ec751adbe1089af5927f694d1 /lib/gitlab/bitbucket_import/importer.rb
parentc0403234193dcb2033bd57160bb0ab6893bb8d77 (diff)
downloadgitlab-ce-b58a2e30b214ffc98f492aab88137cc3fd48355d.tar.gz
Wrap errors on GitHub importer to raise Projects::ImportService::Error
Diffstat (limited to 'lib/gitlab/bitbucket_import/importer.rb')
-rw-r--r--lib/gitlab/bitbucket_import/importer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb
index e8c6d89764c..3f483847efa 100644
--- a/lib/gitlab/bitbucket_import/importer.rb
+++ b/lib/gitlab/bitbucket_import/importer.rb
@@ -16,6 +16,8 @@ module Gitlab
import_issues if has_issues?
true
+ rescue ActiveRecord::RecordInvalid => e
+ raise Projects::ImportService::Error.new, e.message
ensure
Gitlab::BitbucketImport::KeyDeleter.new(project).execute
end