MCPcopy
hub / github.com/simstudioai/sim / sendError

Function sendError

apps/realtime/src/routes/http.ts:49–52  ·  view source on GitHub ↗
(res: ServerResponse, message: string, status = 500)

Source from the content-addressed store, hash-verified

47}
48
49function sendError(res: ServerResponse, message: string, status = 500): void {
50 res.writeHead(status, { 'Content-Type': 'application/json' })
51 res.end(JSON.stringify({ error: message }))
52}
53
54/**
55 * Creates an HTTP request handler for the socket server

Callers 1

createHttpHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected