Skip to content

Commit 85b4764

Browse files
authored
Log retrieve call failure (ITISFoundation#2574)
1 parent 1e0b895 commit 85b4764

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

services/web/client/source/class/osparc/data/model/Node.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -955,24 +955,25 @@ qx.Class.define("osparc.data.model.Node", {
955955
this.getPropsForm().retrievedPortData(portKey, true, sizeBytes);
956956
}
957957
}, this);
958-
updReq.addListener("fail", e => {
959-
const {
960-
error
961-
} = e.getTarget().getResponse();
962-
if (portKey) {
963-
this.getPropsForm().retrievedPortData(portKey, false);
964-
}
965-
console.error("fail", error);
966-
}, this);
967-
updReq.addListener("error", e => {
968-
const {
969-
error
970-
} = e.getTarget().getResponse();
971-
if (portKey) {
972-
this.getPropsForm().retrievedPortData(portKey, false);
973-
}
974-
console.error("error", error);
975-
}, this);
958+
[
959+
"fail",
960+
"error"
961+
].forEach(failure => {
962+
updReq.addListener(failure, e => {
963+
const {
964+
error
965+
} = e.getTarget().getResponse();
966+
if (portKey) {
967+
this.getPropsForm().retrievedPortData(portKey, false);
968+
}
969+
console.error(failure, error);
970+
const msgData = {
971+
nodeId: this.getNodeId(),
972+
msg: "Failed retrieving inputs"
973+
};
974+
this.fireDataEvent("showInLogger", msgData);
975+
}, this);
976+
});
976977
updReq.send();
977978

978979
if (portKey) {

services/web/client/source/class/osparc/desktop/StudyEditor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,11 @@ qx.Class.define("osparc.desktop.StudyEditor", {
354354
__updatePipelineAndRetrieve: function(node, portKey = null) {
355355
this.updateStudyDocument(false)
356356
.then(() => {
357-
this.__getStudyLogger().debug(null, "Retrieveing inputs");
358357
if (node) {
358+
this.__getStudyLogger().debug(node.getNodeId(), "Retrieving inputs");
359359
node.retrieveInputs(portKey);
360+
} else {
361+
this.__getStudyLogger().debug(null, "Retrieving inputs");
360362
}
361363
});
362364
this.__getStudyLogger().debug(null, "Updating pipeline");

0 commit comments

Comments
 (0)