cookie-cutter
cookie-cutter copied to clipboard
There is no check for a output to have a corresponding sink
The following case:
Application.create()
...
.dispatch(new {
onEvent(msg: IEvent, ctx: IDispatchContext): void {
ctx.publish(Response, {});
}
})
.output()
.stored(cosmosSink(cosmosConfigNew))
.done()
does not throw an error even though there is no sink connected to publish
. I think it would be a good check to make sure outputs have a corresponding sink.
that's a good idea ... we already assign a default sink if you don't explicitly hook up a sink (the NullSink
). We could easily change the implementation of it to throw an error vs. being a no-op.