From c09a6948835c9e519829e44f20d649a0dc555f3e Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Thu, 18 May 2017 08:17:15 -0400 Subject: [PATCH] Better error reporting on instantiate page Signed-off-by: Laurence Maultsby --- skyquake/plugins/launchpad/src/instantiate/instantiateStore.js | 3 +++ .../launchpad/src/instantiate/launchNetworkServiceSource.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js index b673e3a18..0d9e1b6e4 100644 --- a/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js +++ b/skyquake/plugins/launchpad/src/instantiate/instantiateStore.js @@ -191,6 +191,9 @@ class LaunchNetworkServiceStore { } launchNSRError(data) { var msg = 'Something went wrong while trying to instantiate. Check the error logs for more information'; + if(data) { + msg = data; + } if (data.error) { msg = data.error; } diff --git a/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js b/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js index 6c5daaafc..d5c33c11d 100644 --- a/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js +++ b/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js @@ -128,7 +128,7 @@ 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); - var error; + var error = null; if(xhr.responseText) { try { error = JSON.parse(xhr.responseText); -- 2.17.1