MCPcopy Create free account
hub / github.com/electric-sql/electric / getEntity

Function getEntity

packages/agents-runtime/src/runtime-server-client.ts:465–477  ·  view source on GitHub ↗
(entityUrl: string)

Source from the content-addressed store, hash-verified

463 }
464
465 const getEntity = async (entityUrl: string): Promise<RuntimeEntityInfo> => {
466 const response = await request(entityRpcPath(entityUrl), { method: `GET` })
467 if (!response.ok) {
468 throw new Error(
469 `failed to resolve entity ${entityUrl} (${response.status}): ${await readErrorText(response)}`
470 )
471 }
472
473 return requireEntityInfo(
474 (await response.json()) as RuntimeEntityResponse,
475 `failed to resolve entity ${entityUrl}`
476 )
477 }
478
479 const spawnEntity = async ({
480 type,

Callers 1

spawnEntityFunction · 0.70

Calls 5

entityRpcPathFunction · 0.85
readErrorTextFunction · 0.85
requireEntityInfoFunction · 0.85
jsonMethod · 0.80
requestFunction · 0.70

Tested by

no test coverage detected