© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Idiomatic error handling in `Effect.gen`: explicit return vs. yield without return - Effect Community
EC
Effect Community
•
8mo ago
noah
Idiomatic error handling in `Effect.gen`: explicit return vs. yield without return
Within an
Effect.gen
Effect.gen
, is it more idiomatic to explicitly return on errors
return yield* new MyError()
return yield* new MyError()
or to just yield them omitting the return statement
yield* new MyError()
yield* new MyError()
.
Effect Community
Join
Production-grade applications in TypeScript.
6,221
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Handling FiberSet Finalization and Error Propagation in Effect.gen
EC
Effect Community / 🚀-effect
7mo ago
Handling `this` with `Effect.gen` in Classes
EC
Effect Community / 🚀-effect
2y ago
Idiomatic way to interrupt an Effect when an error occurs inside Effect.gen
EC
Effect Community / 🚀-effect
3y ago
Handling Side Effects in Effect.gen Function Body
EC
Effect Community / 🚀-effect
10mo ago