Function: cachedOrFail()
cachedOrFail<
C
,M
,I
,ND
>(transform
?): (action
) =>Promise
<ND
>
Retrieve an instance from the cache. If the instance is not in cache or if the included relations are not loaded, throws an "ExpectedRunFailureError".
Type parameters
• C extends object
• M extends Model
• I extends any
• ND = I
Parameters
• transform?
Returns
Function
Parameters
• action: Action
<C
& ConsumeCache
& ConsumeModel
<M
> & ConsumeInclude
& ConsumeId
, any
>
Returns
Promise
<ND
>
Source
packages/core/src/actions/context/runners/cachedOrFail.ts:35