- 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