MCPcopy Index your code
hub / github.com/anomalyco/opencode / fail

Function fail

packages/opencode/src/storage/storage.ts:245–246  ·  view source on GitHub ↗
(target: string)

Source from the content-addressed store, hash-verified

243 )
244
245 const fail = (target: string): Effect.Effect<never, NotFoundError> =>
246 Effect.fail(new NotFoundError({ message: `Resource not found: ${target}` }))
247
248 const wrap = <A>(target: string, body: Effect.Effect<A, FSUtil.Error>) =>
249 body.pipe(Effect.catchIf(missing, () => fail(target)))

Callers 1

wrapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected