Merge pull request #670 from CartoDB/chore/ch106733/improve-sql-api-error-handling

Fix row_too_large error handling
This commit is contained in:
Jorge Tarrero 2020-10-23 15:31:15 +02:00 committed by GitHub
commit 8a630186c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ PostgresFormat.prototype.sendResponse = function (opts, callback) {
query.on('error', function (err) {
that.error = err;
if (err.message && err.message.match(/row too large, was \d* bytes/i)) {
return console.error(JSON.stringify({
console.error(JSON.stringify({
username: opts.username,
type: 'row_size_limit_exceeded',
error: err.message