MCPcopy Create free account
hub / github.com/Effect-TS/effect / serviceNotFoundError

Function serviceNotFoundError

packages/effect/src/Context.ts:1047–1057  ·  view source on GitHub ↗
(service: Key<any, any>)

Source from the content-addressed store, hash-verified

1045}
1046
1047const serviceNotFoundError = (service: Key<any, any>) => {
1048 const error = new Error(
1049 `Service not found${service.key ? `: ${String(service.key)}` : ""}`
1050 )
1051 if (error.stack) {
1052 const lines = error.stack.split("\n")
1053 lines.splice(1, 3)
1054 error.stack = lines.join("\n")
1055 }
1056 return error
1057}
1058
1059/**
1060 * Gets the service for a key safely wrapped in an `Option`.

Callers 1

Context.tsFile · 0.85

Calls 3

joinMethod · 0.80
StringInterface · 0.70
splitMethod · 0.45

Tested by

no test coverage detected