diff --git a/scripts/server.js b/scripts/server.js index faba51fc..2ef86ba3 100644 --- a/scripts/server.js +++ b/scripts/server.js @@ -655,7 +655,13 @@ setups.getBackendSetups(function (setups) { 1, ], function (error, stdout, stderr) { - res.send(stdout); + if (error) { + logger("warn", error) + res.status(400).send(); + } + else { + res.send(stdout); + } } ); } @@ -677,7 +683,13 @@ setups.getBackendSetups(function (setups) { "python", ["private/api/BandsToProfile.py", path, x, y, xyorll, bands], function (error, stdout, stderr) { - res.send(stdout); + if (error) { + logger("warn", error) + res.status(400).send(); + } + else { + res.send(stdout); + } } ); } diff --git a/src/essence/Tools/Identifier/IdentifierTool.js b/src/essence/Tools/Identifier/IdentifierTool.js index 3fee524e..9b040a59 100644 --- a/src/essence/Tools/Identifier/IdentifierTool.js +++ b/src/essence/Tools/Identifier/IdentifierTool.js @@ -439,6 +439,13 @@ function bestMatchInLegend(rgba, legendData) { function queryDataValue(url, lng, lat, numBands, callback) { numBands = numBands || 1 + var dataPath + if (url.startsWith("/vsicurl/")) { + dataPath = url + } + else { + dataPath = 'Missions/' + L_.mission + '/' + url + } calls.api( 'getbands', { @@ -447,7 +454,7 @@ function queryDataValue(url, lng, lat, numBands, callback) { y: lng, xyorll: 'll', bands: '[[1,' + numBands + ']]', - path: 'Missions/' + L_.mission + '/' + url, + path: dataPath, }, function (data) { //Convert python's Nones to nulls