RIFT-14970: Display general error message when ns fails to launch
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js
index 5cf0807..a215230 100644
--- a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js
+++ b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js
@@ -183,7 +183,11 @@
return window.location.hash = 'launchpad/' + tokenizedHash[2];
}
launchNSRError(error) {
- Alt.actions.global.showError.defer('Something went wrong while trying to instantiate. Check the error logs for more information');
+ var msg = 'Something went wrong while trying to instantiate. Check the error logs for more information';
+ // if(error) {
+ // msg = error;
+ // }
+ Alt.actions.global.showNotification.defer(msg);
Alt.actions.global.hideScreenLoader.defer();
this.setState({
isLoading: false
diff --git a/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js b/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
index 1b2d526..b4b7173 100644
--- a/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
+++ b/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
@@ -128,7 +128,15 @@
}).fail(function(xhr){
//Authentication and the handling of fail states should be wrapped up into a connection class.
Utils.checkAuthentication(xhr.status);
- reject();
+ var error;
+ if(xhr.responseText) {
+ try {
+ error = JSON.stringify(xhr.responseText);
+ } catch(e){
+
+ }
+ }
+ reject(error);
});
})
},