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

Commit 737a258

Browse files
authored
Merge pull request #1333 from matrix-org/dbkr/fix_uncaught_exception_if_no_scalar
Catch the promise rejection if scalar fails
2 parents cc36304 + c11432c commit 737a258

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)