Remove unnecessary 401 retry

This commit is contained in:
Zed 2023-03-28 00:33:40 +02:00
parent bb6f8a2de1
commit f0e1cb5ddb
1 changed files with 0 additions and 5 deletions

View File

@ -72,11 +72,6 @@ template fetchImpl(result, fetchBody) {.dirty.} =
if resp.status == $Http400 and "TimeoutError" in result:
getContent()
# Twitter randomly returns 401 errors with an empty body quite often.
# Retrying the request usually works.
if resp.status == $Http401 and result.len == 0:
getContent()
if resp.status == $Http503:
badClient = true
raise newException(BadClientError, "Bad client")