horizon-react icon indicating copy to clipboard operation
horizon-react copied to clipboard

Error responses from websocket are swallowed

Open BBB opened this issue 9 years ago • 2 comments

At the moment websocket error responses get swallowed and I have to manually inspect the messages to see what's wrong.

I've attempted to do:

collection.update(formData).subscribe(
  (d) => console.log('DONE', d),
  (err) => console.error(err),
)

Within my client code and changing https://github.com/flipace/horizon-react/blob/0806ede99abd4153117d6191dc10f9cce5bfbd20/src/components/subscribe.js#L206 to:


this.subscriptions[name] = {
  subscription: query
    .watch()
    .subscribe(
      this.handleData.bind(this, name),
      err => console.error(err)
    }),
  query: query._query
};

Neither of these will receive the error response. It's also not received by handleData (https://github.com/flipace/horizon-react/blob/0806ede99abd4153117d6191dc10f9cce5bfbd20/src/components/subscribe.js#L221)

Any guidance on how to go about this would be appreciated.

BBB avatar Jul 28 '16 10:07 BBB

@flipace I'm going to try to set up a better test case for this and dig into it today

BBB avatar Aug 03 '16 09:08 BBB

@BBB thanks for that. i'm busy with tons of other things atm and can't really look into it much right now.

flipace avatar Aug 03 '16 11:08 flipace