mirror of
https://github.com/zedeus/nitter.git
synced 2025-12-06 03:55:36 -05:00
Skip null fetch errors
This commit is contained in:
@@ -126,10 +126,11 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
|
|||||||
result = newJNull()
|
result = newJNull()
|
||||||
|
|
||||||
let error = result.getError
|
let error = result.getError
|
||||||
echo "Fetch error, API: ", api, ", error: ", error
|
if error != null:
|
||||||
if error in {expiredToken, badToken, locked}:
|
echo "Fetch error, API: ", api, ", error: ", error
|
||||||
invalidate(account)
|
if error in {expiredToken, badToken, locked}:
|
||||||
raise rateLimitError()
|
invalidate(account)
|
||||||
|
raise rateLimitError()
|
||||||
|
|
||||||
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =
|
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =
|
||||||
retry:
|
retry:
|
||||||
|
|||||||
Reference in New Issue
Block a user