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

Function handleProxyError

scripts/proxy-utils.mjs:249–259  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

247 res.on("error", finish);
248
249 const handleProxyError = (err) => {
250 metrics.totalErrors += 1;
251 if (!isBenignSocketError(err)) {
252 console.error(
253 `[${label}] Proxy error for ${req.url} -> ${target}:`,
254 err,
255 );
256 }
257 writeProxyError(res, err instanceof Error ? err.message : String(err));
258 finish();
259 };
260
261 try {
262 proxy.web(req, res, { target }).catch(handleProxyError);

Callers 1

proxyHttpFunction · 0.85

Calls 4

isBenignSocketErrorFunction · 0.85
writeProxyErrorFunction · 0.85
errorMethod · 0.80
finishFunction · 0.70

Tested by

no test coverage detected