Understanding Missing Error Messages in Effect.ts Logging

Hi

Why I don't see error message but only _tag?

import { Cause, Effect, pipe } from "effect"

const program1 = 
  pipe(
    Effect.try(() => { throw new Error("Some error :/") })
  )

const main = 
  await pipe(
    Effect.Do,
    Effect.bind("sub", () => program1),
    Effect.tap(() =>
      Effect.logInfo("another message from main"),
    ),
    Effect.catchAll(error =>
      Effect.logInfo("cause", error)
    ),
    Effect.runPromise
  )


alkondaurov@C16820 effortless % bun run log2.ts                             
timestamp=2024-09-22T14:21:03.572Z level=INFO fiber=#0 message=cause message="{
  \"cause\": {},
  \"_tag\": \"UnknownException\"
}"
Was this page helpful?