added error handling for hello()
This commit is contained in:
@@ -6,8 +6,8 @@ and [icons](https://google.github.io/material-design-icons/#icon-font-for-the-we
|
|||||||
|
|
||||||
This is work in progress. Bugs are expected. The app was tested in the latest Chrome & Firefox only.
|
This is work in progress. Bugs are expected. The app was tested in the latest Chrome & Firefox only.
|
||||||
|
|
||||||
Try it at http://api.tinode.co/x/example-react-js/. Login as one of `alice`, `bob`, `carol`, `dave`, `frank`.
|
Try it live at http://api.tinode.co/x/example-react-js/. Login as one of `alice`, `bob`, `carol`, `dave`, `frank`.
|
||||||
Password is `<login>123`, e.g. login for `alice` is `alice123`.
|
Password is `<login>123`, e.g. password for `alice` is `alice123`.
|
||||||
|
|
||||||
License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1476,14 +1476,14 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleDisconnect: function() {
|
handleDisconnect: function(err) {
|
||||||
this.setState({
|
this.setState({
|
||||||
sidePanelSelected: 'login',
|
sidePanelSelected: 'login',
|
||||||
sidePanelTitle: null,
|
sidePanelTitle: null,
|
||||||
sidePanelAvatar: null,
|
sidePanelAvatar: null,
|
||||||
dialogSelected: null,
|
dialogSelected: null,
|
||||||
loggedIn: false,
|
loggedIn: false,
|
||||||
errorText: 'disconnected',
|
errorText: err && err.message ? err.message : 'disconnected',
|
||||||
topicSelected: '',
|
topicSelected: '',
|
||||||
loginDisabled: false,
|
loginDisabled: false,
|
||||||
subscriptions: {},
|
subscriptions: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user