Handling Errors When Yielding a Service in Effect Typescript

I'm not sure how to search for this exactly - should yielding a service ever error? For example, I have a PackageManager service that I'd like to have implement functions like install: Effect<void>, add, remove, etc. However, I need the current working directory to have 1) package.json and 2) package.json#packageManager defined. Should I be doing this check at the start of each install function and yield an error like PackageManager.NotFound then or when I'm injecting my service? What's the most idiomatic Effect approach for this? Thanks in advance
Was this page helpful?