Skip to content

fix: emit errors on stream when .resolve method rejects#141

Merged
trygve-lie merged 2 commits intomasterfrom
fix_error_handling_in_stream
Oct 6, 2020
Merged

fix: emit errors on stream when .resolve method rejects#141
trygve-lie merged 2 commits intomasterfrom
fix_error_handling_in_stream

Conversation

@digitalsadhu
Copy link
Member

.stream method was not handling promise rejections from resource.resolve so if the resolve method rejected (eg. if resource was marked as throwable) then we got an unhandled promise rejection warning. This PR adds a catch and then just emits the error on the stream.

Copy link
Contributor

@trygve-lie trygve-lie left a comment

Choose a reason for hiding this comment

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

Lgtm

@trygve-lie trygve-lie merged commit 9bc989b into master Oct 6, 2020
@trygve-lie trygve-lie deleted the fix_error_handling_in_stream branch October 6, 2020 10:05
github-actions bot pushed a commit that referenced this pull request Oct 6, 2020
## [4.4.3](v4.4.2...v4.4.3) (2020-10-06)

### Bug Fixes

* emit errors on stream when .resolve method rejects ([#141](#141)) ([9bc989b](9bc989b))
@github-actions
Copy link

github-actions bot commented Oct 6, 2020

🎉 This PR is included in version 4.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Oct 6, 2020
# [5.0.0-next.6](v5.0.0-next.5...v5.0.0-next.6) (2020-10-06)

### Bug Fixes

* emit errors on stream when .resolve method rejects ([#141](#141)) ([9bc989b](9bc989b))
@github-actions
Copy link

github-actions bot commented Oct 6, 2020

🎉 This PR is included in version 5.0.0-next.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants