RIFT-14970: Display general error message when ns fails to launch 89/589/1
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 1 Nov 2016 18:27:37 +0000 (14:27 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 1 Nov 2016 18:27:37 +0000 (14:27 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/launchpad/src/instantiate/instantiateStore.js
skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js

index 5cf0807..a215230 100644 (file)
@@ -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
index 1b2d526..b4b7173 100644 (file)
@@ -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);
           });
         })
       },