Pattern Matching Interface for `Effect.match` Similar to `catchTag`

Isn't there a similar pattern matching interface to catchTag for Effect.match? Right now I'm manually using switch against error tags under onFailure which is not as pleasant as catchTag.
const result = yield* Effect.match(program, {
  onSuccess: (v) => ...,
  onFailure: (e) => {
    switch (e._tag) {
      case "ErrorTypeA":
        ...
      case "ErrorTypeB":
        ...
    }
  },
};
Was this page helpful?