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