MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _truncate_diagnostic_text

Function _truncate_diagnostic_text

uncommon_route/proxy.py:1912–1916  ·  view source on GitHub ↗
(text: str, limit: int = 240)

Source from the content-addressed store, hash-verified

1910
1911
1912def _truncate_diagnostic_text(text: str, limit: int = 240) -> str:
1913 compact = " ".join(str(text or "").split())
1914 if len(compact) <= limit:
1915 return compact
1916 return compact[: limit - 3] + "..."
1917
1918
1919def _extract_error_details(status_code: int, content: bytes) -> tuple[str, str]:

Callers 1

_extract_error_detailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected