lib/nexus_cli/errors.rb in nexus_cli-0.4.0 vs lib/nexus_cli/errors.rb in nexus_cli-0.5.0
- old
+ new
@@ -79,11 +79,11 @@
status_code(108)
end
class SearchParameterMalformedException < NexusCliError
def message
- "Submit your search request specifying the search key, type, and value. The available search types are `equal`, `matches`, `bounded`, and `notequal`."
+ "Submit your search request specifying one or more 3 colon-separated values: `key:type:value`. The available search types are `equal`, `matches`, `bounded`, and `notequal`."
end
status_code(109)
end
class BadSearchRequestException < NexusCliError
@@ -103,6 +103,50 @@
The output from the server was:
#{@server_response}}
end
status_code(111)
end
-end
\ No newline at end of file
+
+ class CreateRepsitoryException < NexusCliError
+ def initialize(body)
+ @server_response = JSON.pretty_generate(JSON.parse(body))
+ end
+
+ def message
+ %{Your create repository command failed due to the following:
+ #{@server_response}}
+ end
+ status_code(112)
+ end
+
+ class RepositoryDoesNotExistException < NexusCliError
+ def message
+ "The repository you are trying to delete does not exist."
+ end
+ status_code(113)
+ end
+
+ class RepositoryNotFoundException < NexusCliError
+ def message
+ "The repository you requested information could not be found. Please ensure the repository exists."
+ end
+ status_code(114)
+ end
+
+ class UnexpectedStatusCodeException < NexusCliError
+ def initialize(code)
+ @code = code
+ end
+
+ def message
+ "The server responded with a #{@code} status code which is unexpected. Please submit a bug."
+ end
+ status_code(115)
+ end
+
+ class N3ParameterMalformedException < NexusCliError
+ def message
+ "Submit your tag request specifying one or more 2 colon-separated values: `key:value`. The key can only consist of alphanumeric characters."
+ end
+ status_code(116)
+ end
+end