diff --git a/lib/cartodb/api/overviews_metadata_api.js b/lib/cartodb/api/overviews_metadata_api.js index f3568f5c..738753f0 100644 --- a/lib/cartodb/api/overviews_metadata_api.js +++ b/lib/cartodb/api/overviews_metadata_api.js @@ -25,8 +25,7 @@ OverviewsMetadataApi.prototype.getOverviewsMetadata = function (username, sql, c var query = 'SELECT * FROM CDB_Overviews(CDB_QueryTablesText($windshaft$' + prepareSql(sql) + '$windshaft$))'; this.pgQueryRunner.run(username, query, function handleOverviewsRows(err, rows) { if (err){ - var msg = err.message ? err.message : err; - callback(new Error('could not get overviews metadata: ' + msg)); + callback(err); return; } var metadata = {}; diff --git a/test/acceptance/multilayer_server.js b/test/acceptance/multilayer_server.js index 544aea6c..7728073b 100644 --- a/test/acceptance/multilayer_server.js +++ b/test/acceptance/multilayer_server.js @@ -334,7 +334,7 @@ describe('tests from old api translated to multilayer', function() { var parsed = JSON.parse(res.body); assert.deepEqual(parsed, { - errors: ["could not get overviews metadata: fake error message"] + errors: ["fake error message"] }); done();