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

Function _extract_host

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

Source from the content-addressed store, hash-verified

305
306
307def _extract_host(raw: str) -> Optional[str]:
308 match = re.search(r"host='([^']+)'", raw)
309 if match:
310 return match.group(1)
311 match = re.search(r"https?://([^/\s)]+)", raw)
312 if match:
313 return match.group(1)
314 return None
315
316
317def _extract_endpoint(raw: str) -> Optional[str]:

Callers 1

classify_errorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected