Skip to content

Exceptions are swallowed and nil is returned #25

@paneq

Description

@paneq
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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions