datadog-ux-utils Documentation - v1.0.0
    Preparing search index...

    Function useGuardedFetch

    • A thin wrapper that uses ApiRateGuard for fetch() calls and gives you a single place to react to runaway bursts.

      Usage: const guardedFetch = useGuardedFetch(apiGuard, { onBlocked: showToast }); const resp = await guardedFetch('/api/items');

      Parameters

      Returns (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>