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

Function handleProxyError

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

Source from the content-addressed store, hash-verified

347 res.on("error", finish);
348
349 const handleProxyError = (err) => {
350 metrics.totalErrors += 1;
351 if (!isBenignSocketError(err)) {
352 console.error(
353 `[${label}] Proxy error for ${req.url} -> ${target}:`,
354 err,
355 );
356 }
357 writeProxyError(
358 res,
359 err instanceof Error ? err.message : String(err),
360 errorBody,
361 );
362 finish();
363 };
364
365 const options = { target, headers };
366 if (onResponse) {

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