-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for exporting documents with "inconsistent" cursor #12
Conversation
4871b9d
to
af0e2b7
Compare
return | ||
} | ||
} catch (err) { | ||
// Ignore JSON parse errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that wise? Smells like the sort of thing that can cause hard-to-figure-out Node.js problems. Better to be strict in such situations; the stream should not have parse errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can move the catch into JSON parse only, it's only if it's sending something that isn't json, then the error should be handled by a later consumer. Added a comment
af0e2b7
to
646984e
Compare
646984e
to
5679759
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Not sure I am competent to review the stream stuff since it's been a long time since I used it, but it looks good on first glance.
A bit awkward implementation, but we need to handle multiple streams when a cursor is sent by the server. This is also a need code path, so wont affect exports without the flag