Change error messages when getting overviews metadata fails

Remove the detail that the error occurred trying to get overviews
metadata from the error message. This should be less confusing
to the user.
This commit is contained in:
Javier Goizueta 2016-02-23 11:45:26 +01:00
parent 2ac2974414
commit 21f3c8a387
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ OverviewsMetadataApi.prototype.getOverviewsMetadata = function (username, sql, c
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(new Error(msg));
return;
}
var metadata = {};

View File

@ -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();