Enforcing Exhaustive Error Handling in Effect Typescript

Hey! I'm working through a tutorial
const main = program.pipe(
  Effect.catchTags({
    FetchError: () => Effect.succeed("Fetch error"),
    JsonError: () => Effect.succeed("Json error"),
    ParseError: () => Effect.succeed("Parse error"),
  }),
);

and whenever program can produce a new error type, I have to (or rather should) handle it in here.
Now, this is great, but I'd like to be forced by compiler to handle it explicitly, because right now I can skip matching on one of the tags like
const main = program.pipe(
  Effect.catchTags({
    FetchError: () => Effect.succeed("Fetch error"),
  }),
);

is still correct. Is there a function that enforces handling all possible errors?
Was this page helpful?