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

Function handleProxyError

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

Source from the content-addressed store, hash-verified

380 res.on("error", finish);
381
382 const handleProxyError = (err) => {
383 metrics.totalErrors += 1;
384 if (!isBenignSocketError(err)) {
385 console.error(
386 `[${label}] Proxy error for ${req.url} -> ${target}:`,
387 err,
388 );
389 }
390 writeProxyError(
391 res,
392 err instanceof Error ? err.message : String(err),
393 errorBody,
394 );
395 finish();
396 };
397
398 const options = { target, headers };
399 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