AniLink - v3.0.0
    Preparing search index...

    Function circuitScopeOf

    • Extracts the upstream identity for breaker scoping from a request URL. Throws an AniLinkValidationError when the URL cannot be parsed so a request with an unparseable URL fails fast at dispatch instead of silently sharing one breaker bucket with all other malformed-URL traffic (which would let cross-provider or cross-endpoint failures contaminate each other). The error is a normalized AniLinkError subclass so consumers catching AniLinkError still handle it consistently.

      Parameters

      • url: string

        The request URL to extract the upstream host from.

      • OptionalrequestId: string

        Correlation ID stamped onto the validation error, when available.

      Returns string

      The upstream host scoping the breaker.

      An AniLinkValidationError when the URL cannot be parsed.