Fix row_too_large error handling

This commit is contained in:
Jorge Tarrero 2020-10-22 16:48:50 +02:00
parent 053d28edc5
commit 97310ba7ff

View File

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