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

Function writeProxyError

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

Source from the content-addressed store, hash-verified

194}
195
196function writeProxyError(res, message) {
197 if (res.destroyed) return;
198 if (!res.headersSent) {
199 res.writeHead(502, { "Content-Type": "text/plain; charset=utf-8" });
200 res.end(`Bad Gateway: ${message}`);
201 return;
202 }
203 res.destroy();
204}
205
206export function createProxyHandlers({
207 label = "proxy",

Callers 2

createProxyHandlersFunction · 0.85
handleProxyErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected