mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 04:16:00 +00:00
propagate error in mongo stream
This commit is contained in:
@@ -266,6 +266,11 @@ const driver = {
|
|||||||
pass.write(transformMongoData(row));
|
pass.write(transformMongoData(row));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// propagate error
|
||||||
|
cursorStream.on('error', (err) => {
|
||||||
|
pass.emit('error', err);
|
||||||
|
});
|
||||||
|
|
||||||
// Called once the cursor is fully read
|
// Called once the cursor is fully read
|
||||||
cursorStream.on('end', () => {
|
cursorStream.on('end', () => {
|
||||||
pass.emit('end');
|
pass.emit('end');
|
||||||
|
|||||||
Reference in New Issue
Block a user