You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a really easy mistake to make particularly for someone new. Currently if you omit the sourceId from an event, this is thrown:
TypeError: Cannot call method 'toString' of undefined
at Asset.Space.eventSourcing.Aggregate.Aggregate._validateEvent (packages/space_event-sourcing/source/server/domain/aggregate.coffee:119:27)
at Asset.Space.eventSourcing.Aggregate.Aggregate.record (packages/space_event-sourcing/source/server/domain/aggregate.coffee:79:6)
at Asset._myCommandHandler (packages/myPackage/src/domain/myAggregate.js:64:17)
at Asset.Space.eventSourcing.Aggregate.Aggregate.handle (packages/space_event-sourcing/source/server/domain/aggregate.coffee:95:27)
at AssetRouter.<anonymous> (packages/space_event-sourcing/source/server/infrastructure/router.coffee:93:65)
at AssetRouter.Space.eventSourcing.Router.Router._handleDomainErrors (packages/space_event-sourcing/source/server/infrastructure/router.coffee:102:17)
at AssetRouter.Space.eventSourcing.Router.Router.messageHandler (packages/space_event-sourcing/source/server/infrastructure/router.coffee:93:26)
at packages/space_event-sourcing/source/server/infrastructure/router.coffee:1:1
at CommandBus.Space.messaging.CommandBus.CommandBus.send (packages/space_messaging/source/command_bus.coffee:25:7)
at [object Object]:1:-11
-> ${eventType} in ${aggregate} is missing a sourceId. Add sourceId: this.getId() to this event
The text was updated successfully, but these errors were encountered:
This is a really easy mistake to make particularly for someone new. Currently if you omit the
sourceId
from an event, this is thrown:->
${eventType} in ${aggregate} is missing a sourceId. Add sourceId: this.getId() to this event
The text was updated successfully, but these errors were encountered: