MCPcopy
hub / github.com/HisMax/RedInk / _extract_endpoint

Function _extract_endpoint

backend/errors.py:317–327  ·  view source on GitHub ↗
(raw: str)

Source from the content-addressed store, hash-verified

315
316
317def _extract_endpoint(raw: str) -> Optional[str]:
318 match = re.search(r"url:\s*(/[^\s)]+)", raw, re.IGNORECASE)
319 if match:
320 return match.group(1)
321 match = re.search(r"with url:\s*(/[^\s)]+)", raw, re.IGNORECASE)
322 if match:
323 return match.group(1)
324 match = re.search(r"https?://[^/]+(/[^\s)]+)", raw)
325 if match:
326 return match.group(1)
327 return None
328
329
330def _looks_like_proxy_refused(text: str) -> bool:

Callers 1

classify_errorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected