foundation-store.abstractstore.createerrorlistener
Home > @genesislcap/foundation-store > AbstractStore > createErrorListener
AbstractStore.createErrorListener property
Creates an error event listener.
Signature:
protected createErrorListener: <TDetail extends Error = Error>(keys: KeyOrKeys<TEventDetailMap & TInternalEventDetailMap>, token?: (detail: TDetail, event?: CustomEvent<TDetail>) => void) => EventListener;
Remarks
This logs and stores errors by event key in the store fragment's ErrorMap, allowing multiple errors to co-exist, and be presentable to the user via the UI for further action or dismissal.