This commit is contained in:
Daniel García Aubert 2018-06-14 01:01:05 +02:00
parent 8eab164e4e
commit 9299fe51ce

View File

@ -106,6 +106,7 @@ function handleCopyTo (logger) {
})
.on('end', () => metrics.end(copyToStream.rowCount))
.pipe(res)
// TODO: I think this error handling is not necessary
.on('error', err => {
metrics.end(null, err);
pgstream.unpipe(res);