caolan / caolan/highland

assertion hangs within a `pull` callback, and errors silently ignored within any function callback for the API

Open
#146 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

See this question about the test hanging on assert http://stackoverflow.com/questions/26770345/mocha-with-nodejs-assert-hangs-timeouts-for-assertfalse-instead-of-error.

Also is it possible to report some errors happening in function callbacks. For example if I have a stream generator:

```
return _(function(push, next) {
cheers.scrape(config).then(function(result) {
push(null, result);
next(self.articleLinkStreamByPage(yazar, page + 1));
});
});
```

and any error happens within this function callback, eg: `self is undefined`, then it silently ignores and does some weird things, is that intended, or could it be fixed?

PS: I think these two questions are related, that if highland.js is silently catching and ignoring the errors, than `assert(false)`, will be catched as well, thus it causes tests to hang somehow?

Edit: Also If I have an error in the stream callback functions, the tests will hang no matter what I do.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the hanging assertion and silently ignored callback error described in the issue, using the pull callback and stream generator examples. Trace how errors from function callbacks are handled and compare the behavior with the linked Mocha question; done means callback errors are reported and failed assertions do not leave tests hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
stream-processing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.