Module: Kitsune::Kit::Errors

Defined in:
lib/kitsune/kit/errors.rb

Defined Under Namespace

Classes: AuthenticationError, ConfigurationError, ConnectionError, Error, ProviderError, RemoteCommandError, TimeoutError, UnsafeOperationError, VerificationError

Constant Summary collapse

EXIT_STATUS =
{
  "configuration_error" => 3,
  "authentication_error" => 4,
  "provider_error" => 5,
  "connection_error" => 6,
  "remote_command_error" => 7,
  "verification_error" => 8,
  "unsafe_operation" => 9,
  "timeout" => 10
}.freeze

Class Method Summary collapse

Class Method Details

.exit_status(error) ⇒ Object



93
94
95
# File 'lib/kitsune/kit/errors.rb', line 93

def self.exit_status(error)
  EXIT_STATUS.fetch(error.respond_to?(:code) ? error.code : nil, 1)
end