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.
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
AniLinkErrorsubclass so consumers catchingAniLinkErrorstill handle it consistently.