func IsFailoverable()

in internal/loader/errors.go [31:49]


func IsFailoverable(err error) bool {
	if err == nil {
		return false
	}

	if _, ok := err.(net.Error); ok {
		return true
	}

	var respErr *azcore.ResponseError
	if errors.As(err, &respErr) &&
		(respErr.StatusCode == http.StatusTooManyRequests ||
			respErr.StatusCode == http.StatusRequestTimeout ||
			respErr.StatusCode >= http.StatusInternalServerError) {
		return true
	}

	return false
}