@adcp/client API Reference - v3.11.2
    Preparing search index...

    Function is401Error

    • Check if an error indicates a 401 Unauthorized response

      This helper centralizes the fragile logic of detecting 401 errors from various sources (HTTP status codes, error messages, wrapped errors). Used during endpoint discovery to detect authentication requirements.

      Parameters

      • error: unknown

        The error to check

      • got401Flag: boolean = false

        Optional flag that was set by tracking HTTP responses

      Returns boolean

      true if the error appears to be a 401 authentication error