Closed chriszs closed 4 years ago
Argh -- ty for flagging this.
Let the record show that I very much do not like that callback convention.
Would you prefer a more async/await
style? Is this my chance to sneak my promisification into this?
~Oh boy yes let's do it!~
I guess the responsible thing to do would be to fix the bug and treat promise refactoring as a separate issue ... bah.
Closed by #56
Bug
Current Behavior
When I try to inherit from the AbstractIngestionEngine and use it to stream from a file (after fixing #57 and #58), I get:
After adding a log statement for error events for each stream in the pipe, I get
Promise { <pending> }
as an error from theingestPayload
stream. This is the promise produced bythis.producer.send
and passed as the first argument todone
, which is interpreted as an error because that's convention for callbacks.Input
Expected Behavior
I expected it to not throw that error.
Possible Solutions
Wait for the promise from sending to the producer, call
done()
without a first argument on success.Related Issues
57 and #58