class HttpError extends Data.TaggedClass('HttpError')<{}> {}
declare function fetch<A>(): Effect.Effect<never, HttpError, A>;
const getUser = pipe(fetch<string>(), Effect.orDie);
const program = pipe(
getUser,
Effect.catchAllCause((e) => {
// do something with HttpError
})
);
class HttpError extends Data.TaggedClass('HttpError')<{}> {}
declare function fetch<A>(): Effect.Effect<never, HttpError, A>;
const getUser = pipe(fetch<string>(), Effect.orDie);
const program = pipe(
getUser,
Effect.catchAllCause((e) => {
// do something with HttpError
})
);