From 9b31df6793d27d3c2966a0f5f33ac4d682cb0468 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 2 Mar 2015 14:34:01 +0100 Subject: [PATCH] Improve row size limit error message --- NEWS.md | 4 ++++ app/controllers/app.js | 1 + app/models/formats/pg.js | 18 ++++++++++-------- test/acceptance/app.test.js | 5 ++++- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index f7d5e1df..0eb14a9b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ 1.21.1 - 2015-mm-dd ------------------- +Enhancements: + + * Improve row size limit error message + 1.21.0 - 2015-03-02 ------------------- diff --git a/app/controllers/app.js b/app/controllers/app.js index 527b9354..3d6ec2bc 100755 --- a/app/controllers/app.js +++ b/app/controllers/app.js @@ -458,6 +458,7 @@ function handleQuery(req, res) { sql = new PSQL.QueryWrapper(sql).orderBy(orderBy, sortOrder).window(limit, offset).query(); var opts = { + username: cdbUsername, dbopts: dbopts, sink: res, gn: gn, diff --git a/app/models/formats/pg.js b/app/models/formats/pg.js index 4b411ed2..f15d1109 100644 --- a/app/models/formats/pg.js +++ b/app/models/formats/pg.js @@ -33,13 +33,6 @@ PostgresFormat.prototype.handleQueryRowWithSkipFields = function(row, result) { this.handleQueryRow(row, result); }; -PostgresFormat.prototype.handleQueryError = function(err) { - this.error = err; - if (err.message && err.message.match(/row too large, was \d* bytes/i)) { - console.error(JSON.stringify({error: err.message})); - } -}; - PostgresFormat.prototype.handleNotice = function(msg, result) { if ( ! result.notices ) result.notices = []; for (var i=0; i