Skip to content

toPromise() does not propagate errors properly #683

@NoxPhoenix

Description

@NoxPhoenix

There are certain situations where the toPromise method will resolve successfully with a highland internal error being thrown.

to recreate...

_([1])
  .map(x => _.nil)
  .toArray(arr => console.log);

Will error Error: Cannot call next after nil

however....

_([1])
  .map(x => _.nil)
  .collect()
  .toPromise(Promise)
  .then(console.log);

Will just log an empty array to the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions