Do not expose database error details

This commit is contained in:
Daniel García Aubert 2017-07-25 19:11:56 +02:00
parent edacd85d5c
commit eee4fc815e

View File

@ -9,9 +9,9 @@ BaseDataview.prototype.getResult = function(psql, override, callback) {
var self = this;
this.sql(psql, override, function(err, query) {
psql.query(query, function(err, result) {
if (err) {
return callback(err, result);
var error = new Error(err.message);
return callback(error, result);
}
result = self.format(result, override);