meteor-space / event-sourcing

CQRS and Event Sourcing Infrastructure for Meteor.
MIT License
63 stars 9 forks source link

Aggregate throws an error when snapshot type is not registered #71

Open darko-mijic opened 8 years ago

darko-mijic commented 8 years ago

We have this error now instead of 'undefined is not a function' when snapshot is not registered:

Error: Space.eventSourcing.Aggregate: Snapshot type is undefined. Did you forget to call: Space.eventSourcing.Aggregate.registerSnapshotType()?

darko-mijic commented 8 years ago

Since snapshotting can be disabled we will need a bit more refactoring but in a separate PR.

rhyslbw commented 8 years ago

Good improvement, but let's add a test for this

rhyslbw commented 8 years ago

Would be good to roll this into develop ready for the next release

darko-mijic commented 8 years ago

We need to write a test that cover throwing of this error and tests for rest of errors thrown by es aggregate. I will take care of this next week. I am not available before that.