Shorter way to handle Effect.all with Option.match in Typescript?

This probably has been asked already, but is there any "shorter" way of doing this?
          const { parentWithDoc, parentMetadata } = yield* Effect.all({
            parentWithDoc: getAnnualPlanningById({
              id: data.parentPlanningId,
            }),
            parentMetadata: repo.getParentPlanningById(data.parentPlanningId),
          }).pipe(
            Effect.flatMap(
              flow(
                Option.all,
                Option.match({
                  onSome: (_) => Effect.succeed(_),
                  onNone: () =>
                    Effect.fail(
                      new ParentNotFoundError({
                        parentId: data.parentPlanningId,
                      })
                    ),
                })
              )
            )
          );

I like my pipe, and I don't want to yield the Option and raise a NotSuchElementException
Was this page helpful?