Increased timeout of crouton autodismiss. Added error messaging for failed catalog...
[osm/UI.git] / skyquake / plugins / composer / src / src / stores / CatalogDataStore.js
index 9345bc3..3e4ac7f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * 
+ *
  *   Copyright 2016 RIFT.IO Inc
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
@@ -591,6 +591,13 @@ class CatalogDataStore {
                        this.resetSelectionState();
                }
        }
+       saveCatalogItemError(data){
+               let error = JSON.parse(data.error.responseText);
+               const errorMsg = error && error.body && error.body['rpc-reply'] && JSON.stringify(error.body['rpc-reply']['rpc-error'], null, ' ')
+               ComposerAppActions.showError.defer({
+                       errorMessage: 'Unable to save the descriptor.\n' + errorMsg
+               });
+       }
 }
 
 export default alt.createStore(CatalogDataStore, 'CatalogDataStore');