From 6d5875bc7dc0c978ea27725e0425dff98d77d7f8 Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Tue, 1 Nov 2016 14:27:37 -0400 Subject: [PATCH] RIFT-14970: Display general error message when ns fails to launch Signed-off-by: Laurence Maultsby --- .../launchpad/src/instantiate/instantiateStore.js | 6 +++++- .../src/instantiate/launchNetworkServiceSource.js | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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); }); }) }, -- 2.17.1