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

Function writeProxyError

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

Source from the content-addressed store, hash-verified

294}
295
296function writeProxyError(res, message, errorBody) {
297 if (res.destroyed) return;
298 if (!res.headersSent) {
299 const { contentType, body } = errorBody(message);
300 res.writeHead(502, { "Content-Type": contentType });
301 res.end(body);
302 return;
303 }
304 res.destroy();
305}
306
307/**
308 * @param {object} [options]

Callers 2

createProxyHandlersFunction · 0.85
handleProxyErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected