MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / writeProxyError

Function writeProxyError

scripts/proxy-utils.mjs:47–55  ·  view source on GitHub ↗
(res, message)

Source from the content-addressed store, hash-verified

45}
46
47function writeProxyError(res, message) {
48 if (res.destroyed) return;
49 if (!res.headersSent) {
50 res.writeHead(502, { "Content-Type": "text/plain; charset=utf-8" });
51 res.end(`Bad Gateway: ${message}`);
52 return;
53 }
54 res.destroy();
55}
56
57export function createProxyHandlers({
58 label = "proxy",

Callers 2

createProxyHandlersFunction · 0.85
proxyHttpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected