function shouldRetry(response, retryData) {
        const statusCode = response === null || response === void 0 ? void 0 : response.status;
        if (statusCode === 503 && (response === null || response === void 0 ? void 0 : response.headers.get("Retry-After"))) {
            return false;
        }
        if (statusCode === undefined ||
            (statusCode < 500 && statusCode !== 408) ||
            statusCode === 501 ||
            statusCode === 505) {
            return false;
        }
        const currentCount = retryData && retryData.retryCount;
        return currentCount < retryCount;
    }
/**
     * Determines if the operation should be retried and how long to wait until the next retry.
     *
     * @param statusCode - The HTTP status code.
     * @param retryData -  The retry data.
     * @returns True if the operation qualifies for a retry; false otherwise.
     */
Determines if the operation should be retried and how long to wait until the next retry.
@param statusCode - The HTTP status code.
@param retryData -  The retry data.
@returns True if the operation qualifies for a retry; false otherwise.
Determines if the operation should be retried and how long to wait until the next retry . @param statusCode - The HTTP status code . @param retryData - The retry data . @returns True if the operation qualifies for a retry ; false otherwise .
function shouldRetry(response, retryData) {
        const statusCode = response === null || response === void 0 ? void 0 : response.status;
        if (statusCode === 503 && (response === null || response === void 0 ? void 0 : response.headers.get("Retry-After"))) {
            return false;
        }
        if (statusCode === undefined ||
            (statusCode < 500 && statusCode !== 408) ||
            statusCode === 501 ||
            statusCode === 505) {
            return false;
        }
        const currentCount = retryData && retryData.retryCount;
        return currentCount < retryCount;
    }
function shouldRetry ( response , retryData ) { const statusCode = response === null || response === void 0 ? void 0 : response . status ; if ( statusCode === 503 && ( response === null || response === void 0 ? void 0 : response . headers . get ( "Retry-After" ) ) ) { return false ; } if ( statusCode === undefined || ( statusCode < 500 && statusCode !== 408 ) || statusCode === 501 || statusCode === 505 ) { return false ; } const currentCount = retryData && retryData . retryCount ; return currentCount < retryCount ; }
Determines if the operation should be retried and how long to wait until the next retry.
Determines if the operation should be retried and how long to wait until the next retry .