Effect CommunityEC
Effect Community4mo ago
2 replies
bismuth1991

Questions on @effect/workflow

Hi everyone, I was trying to play around with @effect/workflow and ran into some weird problems. Could someone explain to me what I got wrong? Here are the 2 problems I encountered (code provided in thread)

(1) When I ran the code for the first time, everything worked as expected (Email sent only logged once). However, subsequent run yielded the following error
MalformedMessage: { "cause": ({ readonly _tag: "WithExit"; readonly requestId: (string <-> bigint); readonly id: (string <-> bigint); readonly exit: (ExitEncoded<({ readonly _tag: "Complete"; readonly exit: (ExitEncoded<void, (SendEmailError (Encoded side) <-> SendEmailError), Defect> <-> Exit<void, SendEmailError>) }...


(2) When I moved the line Effect.provide(RunnerLayerClient) down to the outermost scoped, the Effect.forEach(...) block did not run anymore
Was this page helpful?