(text: str, limit: int = 240)
| 1910 | |
| 1911 | |
| 1912 | def _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 | |
| 1919 | def _extract_error_details(status_code: int, content: bytes) -> tuple[str, str]: |
no outgoing calls
no test coverage detected