projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from master
[osm/UI.git]
/
skyquake
/
plugins
/
launchpad
/
src
/
instantiate
/
launchNetworkServiceSource.js
diff --git
a/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
b/skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
index
3a8886c
..
6c5daaa
100644
(file)
--- a/
skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
+++ b/
skyquake/plugins/launchpad/src/instantiate/launchNetworkServiceSource.js
@@
-128,7
+128,16
@@
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);
}).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.parse(xhr.responseText);
+ error = JSON.parse(error.error)['rpc-reply']['rpc-error']['error-message'];
+ } catch(e){
+ console.log(e);
+ }
+ }
+ reject(error);
});
})
},
});
})
},
@@
-200,7
+209,13
@@
export default function(Alt){
beforeSend: Utils.addAuthorizationStub,
contentType: "application/json",
success: function(data) {
beforeSend: Utils.addAuthorizationStub,
contentType: "application/json",
success: function(data) {
- resolve(data["rw-launchpad:resource-orchestrator"]);
+ let returnedData;
+ if (data.hasOwnProperty("rw-launchpad:resource-orchestrator")) {
+ returnedData = data['rw-launchpad:resource-orchestrator'];
+ } else {
+ returnedData = {};
+ }
+ resolve(returnedData);
},
error: function(error) {
console.log("There was an error updating the account: ", arguments);
},
error: function(error) {
console.log("There was an error updating the account: ", arguments);