summaryrefslogtreecommitdiff
path: root/lib/bulk_imports/clients/graphql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bulk_imports/clients/graphql.rb')
-rw-r--r--lib/bulk_imports/clients/graphql.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bulk_imports/clients/graphql.rb b/lib/bulk_imports/clients/graphql.rb
index 0adc2b1c57f..a9f908a4247 100644
--- a/lib/bulk_imports/clients/graphql.rb
+++ b/lib/bulk_imports/clients/graphql.rb
@@ -17,6 +17,8 @@ module BulkImports
)
::Gitlab::Json.parse(response.body)
+ rescue *Gitlab::HTTP::HTTP_ERRORS => e
+ raise ::BulkImports::NetworkError, e
end
end
private_constant :HTTP
@@ -55,7 +57,7 @@ module BulkImports
response = client.execute('{ metadata { version } }')
version = Gitlab::VersionInfo.parse(response.data.metadata.version)
- if version.major < BulkImport::MINIMUM_GITLAB_MAJOR_VERSION
+ if version.major < BulkImport::MIN_MAJOR_VERSION
raise ::BulkImports::Error.unsupported_gitlab_version
else
@compatible_instance_version = true