(code: int)
| 176 | |
| 177 | |
| 178 | def classify_http_error(code: int) -> FeedCheckResult: |
| 179 | if code in {404, 410}: |
| 180 | return FeedCheckResult(alive=False, kind="hard_fail", reason=f"http_{code}", status_code=code) |
| 181 | # Treat most HTTP errors as transient to reduce false deletions (WAF/rate-limit/geo blocks). |
| 182 | return FeedCheckResult(alive=False, kind="transient_fail", reason=f"http_{code}", status_code=code) |
| 183 | |
| 184 | |
| 185 | def coerce_check_result(result: Any) -> FeedCheckResult: |
no test coverage detected