added stack to response in development mode
This commit is contained in:
@@ -10,6 +10,7 @@ var _ = require('underscore')
|
||||
, Cache = require('./cache_validator');
|
||||
|
||||
var CartodbWindshaft = function(serverOptions) {
|
||||
var debug = global.environment.environment === 'development';
|
||||
|
||||
if(serverOptions.cache_enabled) {
|
||||
console.log("cache invalidation enabled, varnish on ", serverOptions.varnish_host, ' ', serverOptions.varnish_port);
|
||||
@@ -493,6 +494,9 @@ var CartodbWindshaft = function(serverOptions) {
|
||||
if ( ! _.isUndefined(err.http_status) ) {
|
||||
statusCode = err.http_status;
|
||||
}
|
||||
if(debug) {
|
||||
response.stack = err.stack;
|
||||
}
|
||||
ws.sendError(res, response, statusCode, 'POST INSTANCE TEMPLATE', err.message);
|
||||
} else {
|
||||
res.send(response, 200);
|
||||
|
||||
Reference in New Issue
Block a user