Skip to content
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

Reject first() when stream emits an error event #7

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

clue
Copy link
Member

@clue clue commented Nov 28, 2017

The buffer() and all() functions already explicitly reject when the underlying stream emits an error event. The error event will always be followed by an immediate close event.

This simple PR updates the first() function to also explicitly reject when the underlying stream emits an error event. This allows consumers to get access to the underlying Exception, which the following close event does not report.

Copy link
Member

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

WyriHaximus added a commit to WyriHaximus/http that referenced this pull request Nov 28, 2017
@jsor jsor merged commit 0bee861 into reactphp:master Nov 28, 2017
@clue clue deleted the error-first branch November 28, 2017 17:16
WyriHaximus added a commit to WyriHaximus/http that referenced this pull request Nov 29, 2017
WyriHaximus added a commit to WyriHaximus/http that referenced this pull request Dec 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants