@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Function requireSessionKey

    • Narrow ctx.sessionKey from string | undefined to string. Use this in handlers that require session scoping so you don't litter ! assertions:

      const sessionKey = requireSessionKey(ctx);
      const sessionStore = scopedStore(ctx.store, sessionKey);

      Throws a SERVICE_UNAVAILABLE-style error if sessionKey is missing — typically meaning resolveSessionKey isn't configured or returned undefined for this tool.

      Type Parameters

      • TAccount = unknown

      Parameters

      Returns string