From: Laurence Maultsby Date: Tue, 1 Nov 2016 18:27:37 +0000 (-0400) Subject: RIFT-14970: Display general error message when ns fails to launch X-Git-Tag: v1.0.1~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=6d5875bc7dc0c978ea27725e0425dff98d77d7f8;p=osm%2FUI.git RIFT-14970: Display general error message when ns fails to launch Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js index 5cf0807be..a2152307b 100644 --- a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js +++ b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js @@ -183,7 +183,11 @@ class LaunchNetworkServiceStore { 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 1b2d52675..b4b717303 100644 --- a/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js +++ b/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js @@ -128,7 +128,15 @@ export default function(Alt){ }).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); }); }) },