Return last error message for failed nodes on map creation
This commit is contained in:
parent
74719e48d9
commit
d0980a2872
4
NEWS.md
4
NEWS.md
@ -4,7 +4,11 @@
|
||||
|
||||
Released 2016-mm-dd
|
||||
|
||||
Enhancements:
|
||||
- Return last error message for failed nodes on map creation.
|
||||
|
||||
Announcements:
|
||||
- Upgrades camshaft to [0.35.0](https://github.com/CartoDB/camshaft/releases/tag/0.35.0).
|
||||
- Upgrades lzma to 2.3.2.
|
||||
|
||||
|
||||
|
@ -349,13 +349,17 @@ function addAnalysesMetadata(username, layergroup, analysesResults, includeQuery
|
||||
nodes: nodes.reduce(function(nodesIdMap, node) {
|
||||
if (node.params.id) {
|
||||
var nodeResource = layergroup.layergroupid + '/analysis/node/' + node.id();
|
||||
nodesIdMap[node.params.id] = {
|
||||
var nodeRepr = {
|
||||
status: node.getStatus(),
|
||||
url: getUrls(username, nodeResource)
|
||||
};
|
||||
if (includeQuery) {
|
||||
nodesIdMap[node.params.id].query = node.getQuery();
|
||||
nodeRepr.query = node.getQuery();
|
||||
}
|
||||
if (node.getStatus() === 'failed') {
|
||||
nodeRepr.error_message = node.getErrorMessage();
|
||||
}
|
||||
nodesIdMap[node.params.id] = nodeRepr;
|
||||
}
|
||||
|
||||
return nodesIdMap;
|
||||
|
Loading…
Reference in New Issue
Block a user