Skip to content

err from loadVersion should not be discarded in Apply #19

@metaleap

Description

@metaleap

Culprit:

aggregate = r.New()

loadVersion can fail for reasons other than "not found", such as "store implementation has connectivity outage" etc. You do not want to discard such errs and fall back on a newly-instantiated empty aggregate here...

A fix to this would do so only for errs of type eventsource.Error with a Code() of eventsource.ErrAggregateNotFound I reckon? --- with all other errs being properly returned immediately.

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