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

Function writeProxyError

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

Source from the content-addressed store, hash-verified

262}
263
264function writeProxyError(res, message, errorBody) {
265 if (res.destroyed) return;
266 if (!res.headersSent) {
267 const { contentType, body } = errorBody(message);
268 res.writeHead(502, { "Content-Type": contentType });
269 res.end(body);
270 return;
271 }
272 res.destroy();
273}
274
275/**
276 * @param {object} [options]

Callers 2

createProxyHandlersFunction · 0.85
handleProxyErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected