Module: HealthcheckEndpoint::Error::Configuration

Defined in:
lib/healthcheck_endpoint/core.rb,
lib/healthcheck_endpoint/error/configuration/argument_type.rb,
lib/healthcheck_endpoint/error/configuration/not_configured.rb,
lib/healthcheck_endpoint/error/configuration/enpoint_pattern.rb,
lib/healthcheck_endpoint/error/configuration/unknown_service.rb,
lib/healthcheck_endpoint/error/configuration/http_status_failure.rb,
lib/healthcheck_endpoint/error/configuration/http_status_success.rb,
lib/healthcheck_endpoint/error/configuration/not_callable_service.rb

Constant Summary collapse

ArgumentType =
::Class.new(::ArgumentError) do
  def initialize(arg_value, arg_name)
    super("#{arg_value} is not a valid #{arg_name}")
  end
end
NotConfigured =
::Class.new(::RuntimeError) do
  def initialize
    super('The configuration is empty. Please use HealthcheckEndpoint.configure before')
  end
end
EnpointPattern =
::Class.new(::ArgumentError) do
  def initialize(arg_value, arg_name)
    super("#{arg_value} does not match a valid enpoint pattern for #{arg_name}")
  end
end
UnknownService =
::Class.new(::ArgumentError) do
  def initialize(service_name, services_setter)
    super("Unknown #{service_name} service name for #{services_setter}. You should define it in config.services firstly")
  end
end
HttpStatusFailure =
::Class.new(::ArgumentError) do
  def initialize(arg_value, arg_name)
    super("Status #{arg_value} is wrong HTTP failure status for #{arg_name}. It should be in the range 500-511")
  end
end
HttpStatusSuccess =
::Class.new(::ArgumentError) do
  def initialize(arg_value, arg_name)
    super("Status #{arg_value} is wrong HTTP successful status for #{arg_name}. It should be in the range 200-226")
  end
end
NotCallableService =
::Class.new(::ArgumentError) do
  def initialize(service_name, services_setter)
    super("Service #{service_name} is not callable. All values for #{services_setter} should be a callable objects")
  end
end