Don't discard tokens on length errors

This commit is contained in:
Zed 2021-01-18 16:01:34 +01:00
parent 5ccb24b008
commit 67142bea6a
1 changed files with 3 additions and 2 deletions

View File

@ -65,6 +65,7 @@ proc fetch*(url: Uri; oldApi=false): Future[JsonNode] {.async.} =
release(token, true)
raise rateLimitError()
except Exception as e:
echo "error: ", e.msg, ", url: ", url
release(token, true)
echo "error: ", e.msg, ", token: ", token[], ", url: ", url
if "length" notin e.msg:
release(token, true)
raise rateLimitError()