EventSourcedAggregate.js
function AggregateTypeMismatch(expected, got){
	this.name = 'AggregateTypeMismatch';
	this.message = 'Aggregate type mismatch: expected (' + typeof(expected) + ')' + expected + ', got (' + typeof(got) + ')' + got;
	this.labels = {
		expected: expected,
		got: got,
		critical: true // This error precludes retry attempts (assuming a sane retry strategy is employed).
	};
}
function AggregateTypeMismatch(expected, got){
	this.name = 'AggregateTypeMismatch';
	this.message = 'Aggregate type mismatch: expected (' + typeof(expected) + ')' + expected + ', got (' + typeof(got) + ')' + got;
	this.labels = {
		expected: expected,
		got: got,
		critical: true // This error precludes retry attempts (assuming a sane retry strategy is employed).
	};
}
function AggregateTypeMismatch ( expected , got ) { this . name = 'AggregateTypeMismatch' ; this . message = 'Aggregate type mismatch: expected (' + typeof ( expected ) + ')' + expected + ', got (' + typeof ( got ) + ')' + got ; this . labels = { expected : expected , got : got , critical : true // This error precludes retry attempts (assuming a sane retry strategy is employed). } ; }
Aggregate-event type mismatch. Generated when a commit labelled with another AggregateType is applied to an aggregate.
Also occurs when a snapshot type mismatch takes place.
This prevents loading an aggregateID as another, unrelated aggregate type and trashing the database or bypassing logic restrictions.
@constructor
@extends Error
Aggregate - event type mismatch . Generated when a commit labelled with another AggregateType is applied to an aggregate . Also occurs when a snapshot type mismatch takes place . This prevents loading an aggregateID as another unrelated aggregate type and trashing the database or bypassing logic restrictions .