Merge pull request #1333 from matrix-org/dbkr/fix_uncaught_exception_if_no_scalar
Catch the promise rejection if scalar fails
This commit is contained in:
commit
737a258944
1 changed files with 7 additions and 7 deletions
|
@ -53,11 +53,11 @@ module.exports = React.createClass({
|
||||||
this.scalarClient = null;
|
this.scalarClient = null;
|
||||||
if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) {
|
if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) {
|
||||||
this.scalarClient = new ScalarAuthClient();
|
this.scalarClient = new ScalarAuthClient();
|
||||||
this.scalarClient.connect().done(() => {
|
this.scalarClient.connect().then(() => {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
}).catch((e) => {
|
||||||
|
console.log("Failed to connect to integrations server");
|
||||||
// TODO -- Handle Scalar errors
|
// TODO -- Handle Scalar errors
|
||||||
// },
|
|
||||||
// (err) => {
|
|
||||||
// this.setState({
|
// this.setState({
|
||||||
// scalar_error: err,
|
// scalar_error: err,
|
||||||
// });
|
// });
|
||||||
|
|
Loading…
Reference in a new issue