@cercalia/sdk
    Preparing search index...

    Function requireNonNull

    • Wrapper that converts null results to errors for retry logic.

      Type Parameters

      • T

      Parameters

      • fn: () => Promise<T | null>

        The async function to execute.

      • errorMessage: string

        Error message if the function returns null.

      Returns Promise<T>

      The result of the function if not null.

      Error if the function returns null.