MCPcopy Create free account
hub / github.com/callstack/agent-device / resolveRequestId

Function resolveRequestId

src/remote/daemon-proxy.ts:389–393  ·  view source on GitHub ↗
(req: IncomingMessage)

Source from the content-addressed store, hash-verified

387}
388
389function resolveRequestId(req: IncomingMessage): string {
390 const header = req.headers['x-request-id'];
391 if (typeof header === 'string' && header.trim()) return header.trim().slice(0, 128);
392 return randomUUID();
393}
394
395function sendUnauthorized(res: ServerResponse, route: string, rpcId: unknown): void {
396 res.statusCode = 401;

Callers 1

ensureProxyRequestIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…