Skip to content

Commit 4f01370

Browse files
committed
better practices
1 parent 07b68e6 commit 4f01370

File tree

1 file changed

+9
-1
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+9
-1
lines changed

services/static-webserver/client/source/class/osparc/store/Functions.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ qx.Class.define("osparc.store.Functions", {
110110
.then(func => {
111111
func["resourceType"] = "function";
112112
return func;
113+
})
114+
.catch(error => {
115+
console.error("Error fetching function:", error);
116+
throw error; // Rethrow the error to propagate it to the caller
113117
});
114118
},
115119

@@ -120,7 +124,11 @@ qx.Class.define("osparc.store.Functions", {
120124
},
121125
data: functionChanges
122126
};
123-
return osparc.data.Resources.fetch("functions", "patch", params);
127+
return osparc.data.Resources.fetch("functions", "patch", params)
128+
.catch(error => {
129+
console.error("Error patching function:", error);
130+
throw error; // Rethrow the error to propagate it to the caller
131+
});
124132
},
125133

126134
invalidateFunctions: function() {

0 commit comments

Comments
 (0)