MCPcopy Create free account
hub / github.com/garrytan/gstack / makeError

Function makeError

ios-qa/daemon/src/proxy.ts:92–99  ·  view source on GitHub ↗
(status: number, error: string)

Source from the content-addressed store, hash-verified

90}
91
92function makeError(status: number, error: string): { status: number; headers: Record<string, string>; body: Buffer } {
93 const body = Buffer.from(JSON.stringify({ error }, sanitizeReplacer));
94 return {
95 status,
96 headers: { 'content-type': 'application/json', 'content-length': String(body.length) },
97 body,
98 };
99}
100
101/**
102 * Determine whether the endpoint is allowed on the tailnet listener AND what

Callers 1

proxyToDeviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected