Use windshaft-0.6.2 sendError function to send non-200 responses

Ensures all errors are logged
This commit is contained in:
Sandro Santilli 2012-10-11 16:48:41 +02:00 committed by Luis Bosque
parent 90d726c0cb
commit 4c6d74b69e
3 changed files with 10 additions and 7 deletions

View File

@ -37,7 +37,8 @@ var CartodbWindshaft = function(serverOptions) {
}, },
function(err, data){ function(err, data){
if (err){ if (err){
res.send({error: err.message}, 500); ws.sendError(res, {error: err.message}, 500, 'GET INFOWINDOW');
//res.send({error: err.message}, 500);
} else { } else {
res.send({infowindow: data}, 200); res.send({infowindow: data}, 200);
} }
@ -57,7 +58,8 @@ var CartodbWindshaft = function(serverOptions) {
}, },
function(err, data){ function(err, data){
if (err){ if (err){
res.send(err.message, 500); ws.sendError(res, {error: err.message}, 500, 'GET MAP_METADATA');
//res.send(err.message, 500);
} else { } else {
res.send({map_metadata: data}, 200); res.send({map_metadata: data}, 200);
} }
@ -77,7 +79,8 @@ var CartodbWindshaft = function(serverOptions) {
}, },
function(err, data){ function(err, data){
if (err){ if (err){
res.send(500); ws.sendError(res, {error: err.message}, 500, 'DELETE CACHE');
//res.send(500);
} else { } else {
res.send({status: 'ok'}, 200); res.send({status: 'ok'}, 200);
} }

6
npm-shrinkwrap.json generated
View File

@ -3,7 +3,7 @@
"version": "1.1.0", "version": "1.1.0",
"dependencies": { "dependencies": {
"cluster2": { "cluster2": {
"version": "0.3.5-cdb01", "version": "0.3.5-cdb02",
"from": "git://github.com/CartoDB/cluster2.git#cdb_production", "from": "git://github.com/CartoDB/cluster2.git#cdb_production",
"dependencies": { "dependencies": {
"express": { "express": {
@ -245,7 +245,7 @@
} }
}, },
"windshaft": { "windshaft": {
"version": "0.6.1", "version": "0.6.2",
"dependencies": { "dependencies": {
"express": { "express": {
"version": "2.5.11", "version": "2.5.11",
@ -273,7 +273,7 @@
"version": "4.3.1", "version": "4.3.1",
"dependencies": { "dependencies": {
"optimist": { "optimist": {
"version": "0.3.4", "version": "0.3.5",
"dependencies": { "dependencies": {
"wordwrap": { "wordwrap": {
"version": "0.0.2" "version": "0.0.2"

View File

@ -22,7 +22,7 @@
"node-varnish": "0.1.1", "node-varnish": "0.1.1",
"underscore" : "~1.3.3", "underscore" : "~1.3.3",
"grainstore" : "~0.9.1", "grainstore" : "~0.9.1",
"windshaft" : "~0.6.1", "windshaft" : "~0.6.2",
"step": "0.0.x", "step": "0.0.x",
"generic-pool": "1.0.x", "generic-pool": "1.0.x",
"redis": "0.7.2", "redis": "0.7.2",