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)
pull/21833/head
David Baker 2017-08-23 19:35:33 +01:00
parent cc36304eb4
commit c11432c3e3
1 changed files with 7 additions and 7 deletions

View File

@ -53,14 +53,14 @@ module.exports = React.createClass({
this.scalarClient = null;
if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) {
this.scalarClient = new ScalarAuthClient();
this.scalarClient.connect().done(() => {
this.scalarClient.connect().then(() => {
this.forceUpdate();
// TODO -- Handle Scalar errors
// },
// (err) => {
// this.setState({
// scalar_error: err,
// });
}).catch((e) => {
console.log("Failed to connect to integrations server");
// TODO -- Handle Scalar errors
// this.setState({
// scalar_error: err,
// });
});
}