module HttpEventStore
module Actions
class ReadAllStreamEvents
def initialize(client)
@client = client
end
def call(stream_name)
raise IncorrectStreamData if stream_name.nil? || stream_name.empty?
entries = get_all_stream_entries(stream_name)
return_events(entries)
rescue ClientError => e
raise StreamAlreadyDeleted if e.code == 410
raise StreamNotFound if e.code == 404
end
in case of error code 400 the ClientError is not propagated higher...