Handling Validation Errors and Defects in Effect Typescript

I have a usecase where I want to process some data, if something fails (db, file system, something else) I want to treat that fail as a defect, while "validation errors" are handled as values and not as errors.

Is there an easy way to ignore errors and accumulate them as defect? Basically I want a simple happy path where I handle validation errors in the success channel, and every other error is treated as if it was either an error or a defect, no matter what, so that I can later flag this processing as "failed no matter what".

Or maybe just catchAllCause all the way at the end of my processing?
Was this page helpful?