mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Handle decompression errors
This commit is contained in:
parent
4b356118a6
commit
6bcbe0ea9f
3 changed files with 12 additions and 3 deletions
|
|
@ -64,6 +64,9 @@ proc fetch*(url: Uri; oldApi=false): Future[JsonNode] {.async.} =
|
|||
echo "fetch error: ", result.getError
|
||||
release(token, true)
|
||||
raise rateLimitError()
|
||||
except ZippyError as e:
|
||||
echo "decompression error: ", e.msg, ", url: ", url
|
||||
raise newException(InternalError, "decompression failed: " & $url)
|
||||
except Exception as e:
|
||||
echo "error: ", e.msg, ", token: ", token[], ", url: ", url
|
||||
if "length" notin e.msg and "descriptor" notin e.msg:
|
||||
|
|
|
|||
Loading…
Reference in a new issue