lib/nexus_cli/errors.rb in nexus_cli-0.0.5 vs lib/nexus_cli/errors.rb in nexus_cli-0.1.0
- old
+ new
@@ -30,11 +30,11 @@
"The .nexus_cli file is missing the value: #{@missing_setting}"
end
status_code(102)
end
- class MissingSettingsFile < NexusCliError
+ class MissingSettingsFileException < NexusCliError
def message
"The .nexus_cli file is missing or corrupt."
end
status_code(103)
end
@@ -42,7 +42,31 @@
class NonSecureConnectionException < NexusCliError
def message
"Your communication with a server using an SSL certificate failed during validation. You may want to try the --insecure option."
end
status_code(104)
+ end
+
+ class CouldNotConnectToNexusException < NexusCliError
+ def message
+ "Could not connect to Nexus. Please ensure the url in .nexus_cli is reachable."
+ end
+ status_code(105)
+ end
+
+ class PermissionsException < NexusCliError
+ def message
+ "Your request was denied by the Nexus server due to a permissions error. You will need to administer the Nexus or use a different user/password in .nexus_cli."
+ end
+ status_code(106)
+ end
+
+ class BadUploadRequestException < NexusCliError
+ def message
+ %{Your request was denied by the Nexus server due to a bad request and your artifact has not been uploaded.
+This could mean several things:
+ Your .nexus_cli['repository'] is invalid.
+ The artifact with this identifier alread exists inside the repository and that repository does not allow multiple deployments.}
+ end
+ status_code(107)
end
end
\ No newline at end of file