Seeking Advice on Code Elegance in Effect Usage

I often find myself writing code like this:

yield* _(
  Effect.tryPromise({
    try: () => client.send(cmd),
    catch: (_e) => "email failed" as const,
  }),
);


This is a bit wordy. Is it common in Effect applications to introduce helpers, e.g. as such:

yield *_(tryP(client.send(cmd), "email failed"));


I guess I'm mainly looking for advice on how to avoid "ugly" code.
Was this page helpful?