Hyperlinkv0.8.0-beta.28

Store

Store.resolveOrDieconstsrc/Store.ts:1136
<const C extends StoreContractValue>(
  scope: string | StoreScopeTag,
  contract: C
): Effect.Effect<StoreHandleOf<C>, never, Storage>

Like resolve, but guarantees a handle (resolve hardened with orDie). With the baked-in default store in context (it materializes any scope on demand), this never fails — the always-on observability path, where a resource's engine records unconditionally with no service-sniffing. If a custom store is in context and lacks this scope, that's a wiring error and it dies with a clear message (bake the default so it can materialize the scope).

gettersresolve
Source src/Store.ts:113614 lines
export const resolveOrDie = <const C extends StoreContractValue>(
  scope: string | StoreScopeTag,
  contract: C,
): Effect.Effect<StoreHandleOf<C>, never, Storage> =>
  resolve(scope, contract).pipe(
    Effect.catchTag("StoreScopeNotRegistered", (e) =>
      Effect.die(
        `Store.resolveOrDie: scope "${e.key}" is not registered in the provided store. ` +
          `If Soft override captured an AppStore, register this engine on that Store.Service ` +
          `(Process.store / QueueHyperlink.store / CustomQueueHyperlink.store / RunHyperlink.store) ` +
          `alongside Node.logs — or omit Soft override so Memory soft-default materializes the scope.`,
      ),
    ),
  );
Referenced by 1 symbols