in source/routing-configurer/state-updater.ts [129:148]
constructor(event: IStateUpdaterProperties) {
if (!event.AppId || event.AppId.trim() === '') {
throw new Error('AppId was not found in the event payload');
}
this.appId = event.AppId;
if (!event.TableName || event.TableName.trim() === '') {
throw new Error('TableName was not found in the event payload');
}
this.appConfigTableName = event.TableName;
if (!event.NewState || event.NewState.trim() === '') {
throw new Error('NewState was not found in the event payload');
}
this.newState = event.NewState.trim().toLowerCase();
if (!this.validStates.includes(this.newState)) {
throw new Error(`${this.newState} is not a valid state. Accepted values are: ${JSON.stringify(this.validStates)}`);
}
}