title: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable
body: <p>Say I have the following function references:</p>
  
  <pre><code>const externalRequests = (params) =&gt; Rx.Observable.zip(
    externalApi1(params),
    externalApi2(params)
  )
  </code></pre>
  
  <p>and</p>
  
  <pre><code>const internalDB = (params) =&gt; Rx.Observable.fromPromise(getStuffFromDB(params)
  </code></pre>
  
  <p>externalRequests returns something of the shape:</p>
  
  <pre><code>{ _isScalar: false,
    source: 
     { _isScalar: false,
       source: { _isScalar: false, array: [Object], scheduler: undefined },
       operator: { project: [Object] } },
    operator: undefined }
  </code></pre>
  
  <p>and can be <code>.subscribe</code>'d to.</p>
  
  <p><code>internalDB</code>, when <code>.then</code>'d directly returns the right data from the database, and when wrapped in <code>Rx.Observable.fromPromise</code> as above, returns something of the shape:</p>
  
  <pre><code>{ _p: 
     { handle: 115,
       type: 'promise',
       className: 'Object',
       constructorFunction: { ref: 122 },
       protoObject: { ref: 123 },
       prototypeObject: { ref: 1 },
       status: 'pending',
       promiseValue: { ref: 1 },
       properties: [],
       internalProperties: [ [Object], [Object] ],
       text: '#&lt;Promise&gt;' },
    _s: {} }
  </code></pre>
  
  <p>, which, when <code>.subscribe</code>'d directly returns something like so:</p>
  
  <pre><code>{ isStopped: false,
    observer: 
     { isStopped: false,
       _onNext: [Function: val],
       _onError: [Function: val],
       _onCompleted: [Function: val] },
    m: 
     { isDisposed: false,
       current: { isDisposed: false, current: null } } }
  </code></pre>
  
  <p>Say I now want to flatten all of this into a single stream: so I write something like:</p>
  
  <pre><code>Rx.Observable.zip(externalRequests, internalDB).mergeAll().subsribe(() =&gt; console.log('potato'))
  </code></pre>
  
  <p>And receive an exception of the form:
  <code>You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.</code></p>
  
  <p>To summarize: What is the correct way for me to cast my promise as an Observable, and how do I merge/flatten multiple observables as above?</p>