You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the chat, the user is discussing an issue they are experiencing with the Stream.orDie function in Effect Typescript. They provide a code example to illustrate their misunderstanding or possible bug: they expect Stream.orDie to convert errors into defects, but it seems to still return the original error instead of causing a defect. The user notes that using Stream.onError(Effect.die) achieves their desired outcome, where the application is expected to crash on error.
Key takeaways:
The user expects Stream.orDie to create a defect from an error, but it appears not to function as anticipated.
There may be a potential bug in Stream.orDie.
The user's workaround involves using Stream.onError(Effect.die) to achieve the expected behavior.
Another user, possibly a maintainer or experienced user, confirms it seems like a bug.
Added tests for issue Effect-TS#4356
Effectful failures or not handled by the orDie
TODO: Add stream error from asyncIterator generator as well since that won't be caught either
Summary
In the chat, the user is discussing an issue they are experiencing with the
Stream.orDie
function in Effect Typescript. They provide a code example to illustrate their misunderstanding or possible bug: they expectStream.orDie
to convert errors into defects, but it seems to still return the original error instead of causing a defect. The user notes that usingStream.onError(Effect.die)
achieves their desired outcome, where the application is expected to crash on error.Key takeaways:
Stream.orDie
to create a defect from an error, but it appears not to function as anticipated.Stream.orDie
.Stream.onError(Effect.die)
to achieve the expected behavior.Discord thread
https://discord.com/channels/795981131316985866/1333431564943495219
The text was updated successfully, but these errors were encountered: