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

Function json

packages/agents-runtime/src/create-handler.ts:763–768  ·  view source on GitHub ↗
(body: Record<string, unknown>, status: number)

Source from the content-addressed store, hash-verified

761}
762
763function json(body: Record<string, unknown>, status: number): Response {
764 return new Response(JSON.stringify(body), {
765 status,
766 headers: { 'content-type': `application/json` },
767 })
768}
769
770function formatFetchError(error: unknown): string {
771 if (error instanceof Error) {

Callers 15

apiErrorFunction · 0.85
registerRunnerFunction · 0.85
listRunnersFunction · 0.85
getRunnerFunction · 0.85
heartbeatFunction · 0.85
setRunnerStatusFunction · 0.85
claimWakeFunction · 0.85
runnerHealthFunction · 0.85
ensureCronStreamFunction · 0.85
internal-router.tsFile · 0.85
listWebhookSourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected