Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c11432c

Browse files
committed
Catch the promise rejection if scalar fails
Otherwise this is incredibly annoying when developing if you don't have a scalar that will allow you to register (ie. if you're testing against an HS on your dev box)
1 parent cc36304 commit c11432c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/components/views/rooms/AppsDrawer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ module.exports = React.createClass({
5353
this.scalarClient = null;
5454
if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) {
5555
this.scalarClient = new ScalarAuthClient();
56-
this.scalarClient.connect().done(() => {
56+
this.scalarClient.connect().then(() => {
5757
this.forceUpdate();
58-
// TODO -- Handle Scalar errors
59-
// },
60-
// (err) => {
61-
// this.setState({
62-
// scalar_error: err,
63-
// });
58+
}).catch((e) => {
59+
console.log("Failed to connect to integrations server");
60+
// TODO -- Handle Scalar errors
61+
// this.setState({
62+
// scalar_error: err,
63+
// });
6464
});
6565
}
6666

0 commit comments

Comments
 (0)