flipace / flipace/horizon-react

Error responses from websocket are swallowed

Open
#14 2 comments 0 reactions 1 assignee Claimed by @flipace View on GitHub
bug enhancement help wanted
Dominant language
JavaScript
Stars
112
Forks
5
PR merge metrics
No merged PRs in 30d

Description

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:

``` JS
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:

``` JS

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.