Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix / Return error in projector for removed models #366

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

maxekman
Copy link
Member

Description

Return projector.ErrModelRemoved in case the model was removed when projecting. This check only works if regular versioning is used as the removed status can't be discerned from a not-created entity that would begin on for example version 2.

Affected Components

  • Projector

Related Issues

Fixes #362

Solution and Design

Works by checking that the event is v1 if the model is v0, which means that the model did not exist in the store.

Steps to test and verify

@coveralls
Copy link

coveralls commented Nov 22, 2021

Coverage Status

Coverage increased (+0.03%) to 68.428% when pulling f6db37c on maxekman:362-error-on-deleted-projection into 005a02f on looplab:main.

@maxekman maxekman force-pushed the 362-error-on-deleted-projection branch from 2444832 to f6db37c Compare November 22, 2021 14:40
@maxekman maxekman merged commit c4089ff into looplab:main Nov 22, 2021
@maxekman maxekman deleted the 362-error-on-deleted-projection branch November 22, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

More explicit error message when trying to project event to deleted projection
2 participants