Skip to content

Commit

Permalink
return blank string if error
Browse files Browse the repository at this point in the history
  • Loading branch information
rosano committed Apr 7, 2024
1 parent 07b4368 commit 0fbd6d3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion os-app/task-b-details/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ const mod = {
return '';
}

return mod._DataFoilOLSKDisk.OLSKDiskRead(OLSKCache.OLSKCachePath(__dirname, OLSKCache.OLSKCacheURLBasename(inputData))) || (await require('node-fetch')(inputData)).text();
let response;

try {
response = await require('node-fetch')(inputData);
} catch (e) {
return '';
}

return mod._DataFoilOLSKDisk.OLSKDiskRead(OLSKCache.OLSKCachePath(__dirname, OLSKCache.OLSKCacheURLBasename(inputData))) || response.text();
},

DataCacheAggregateBasename() {
Expand Down

0 comments on commit 0fbd6d3

Please sign in to comment.