Module: MessageStore::Postgres::Get::Category::ConsumerGroup

Defined in:
lib/message_store/postgres/get/category/consumer_group.rb

Constant Summary collapse

Error =
Class.new(RuntimeError)

Class Method Summary collapse

Class Method Details

.error(error_message) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/message_store/postgres/get/category/consumer_group.rb', line 8

def self.error(error_message)
  if error_message.start_with?('Consumer group size must not be less than 1') ||
      error_message.start_with?('Consumer group member must be less than the group size') ||
      error_message.start_with?('Consumer group member must not be less than 0') ||
      error_message.start_with?('Consumer group member and size must be specified')
    Error.new(error_message)
  end
end