Exception: BulkImports::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BulkImports::Error
show all
- Defined in:
- lib/bulk_imports/error.rb
Class Method Summary
collapse
Class Method Details
.destination_full_path_validation_failure(full_path) ⇒ Object
29
30
31
32
|
# File 'lib/bulk_imports/error.rb', line 29
def self.destination_full_path_validation_failure(full_path)
self.new(format(s_("BulkImport|Import failed. '%{path}' already exists. Change the destination and try again."),
path: full_path))
end
|
.destination_namespace_validation_failure(destination_namespace) ⇒ Object
19
20
21
22
|
# File 'lib/bulk_imports/error.rb', line 19
def self.destination_namespace_validation_failure(destination_namespace)
self.new(format(s_("BulkImport|Import failed. Destination '%{destination}' is invalid, " \
"or you don't have permission."), destination: destination_namespace))
end
|
.destination_slug_validation_failure ⇒ Object
24
25
26
27
|
# File 'lib/bulk_imports/error.rb', line 24
def self.destination_slug_validation_failure
self.new(format(s_("BulkImport|Import failed. Destination URL %{url}"),
url: Gitlab::Regex.oci_repository_path_regex_message))
end
|
.invalid_url ⇒ Object
15
16
17
|
# File 'lib/bulk_imports/error.rb', line 15
def self.invalid_url
self.new(s_("BulkImport|Invalid source URL. Enter only the base URL of the source GitLab instance."))
end
|
.not_authorized(full_path) ⇒ Object
39
40
41
42
|
# File 'lib/bulk_imports/error.rb', line 39
def self.not_authorized(full_path)
self.new(format(s_("BulkImport|Import failed. You don't have permission to export '%{path}'."),
path: full_path))
end
|
.scope_or_url_validation_failure ⇒ Object
10
11
12
13
|
# File 'lib/bulk_imports/error.rb', line 10
def self.scope_or_url_validation_failure
self.new(s_("BulkImport|Check that the source instance base URL and the personal access " \
"token meet the necessary requirements."))
end
|
.setting_not_enabled ⇒ Object
44
45
46
47
|
# File 'lib/bulk_imports/error.rb', line 44
def self.setting_not_enabled
self.new(s_("BulkImport|Migration by direct transfer disabled on source or destination instance. " \
"Ask an administrator to enable it on both instances and try again."))
end
|
.source_full_path_validation_failure(full_path) ⇒ Object
34
35
36
37
|
# File 'lib/bulk_imports/error.rb', line 34
def self.source_full_path_validation_failure(full_path)
self.new(format(s_("BulkImport|Import failed. '%{path}' not found."),
path: full_path))
end
|
.unsupported_gitlab_version ⇒ Object
5
6
7
8
|
# File 'lib/bulk_imports/error.rb', line 5
def self.unsupported_gitlab_version
self.new(format(s_("BulkImport|Unsupported GitLab version. Minimum supported version is '%{version}'."),
version: BulkImport::MIN_MAJOR_VERSION))
end
|