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

Propagate Cause In ZChannel#mapOutZIO #7990

Merged
merged 2 commits into from
Apr 7, 2023
Merged

Propagate Cause In ZChannel#mapOutZIO #7990

merged 2 commits into from
Apr 7, 2023

Conversation

adamgfraser
Copy link
Contributor

No description provided.

(out: OutElem) => ZChannel.fromZIO(f(out)).flatMap(ZChannel.write(_)) *> reader,
(e: OutErr1) => ZChannel.fail(e),
(e: Cause[OutErr1]) => ZChannel.failCause(e),
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue is if we extract an E in failureOrCause and the fail with that E we lose the tracing information associated with the original cause.

Copy link
Member

Choose a reason for hiding this comment

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

Strikes me we should probably have ZChannel.refailCause at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

💯

@adamgfraser adamgfraser merged commit 5e3c9d6 into zio:series/2.x Apr 7, 2023
@adamgfraser adamgfraser deleted the mapoutzio branch June 27, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants