mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-22 23:45:30 +00:00
Add URL to request errors
This commit is contained in:
parent
c355beda85
commit
f58824cb35
|
@ -94,7 +94,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
|
||||||
if body.startsWith('{') or body.startsWith('['):
|
if body.startsWith('{') or body.startsWith('['):
|
||||||
result = parseJson(body)
|
result = parseJson(body)
|
||||||
else:
|
else:
|
||||||
echo resp.status, ": ", body
|
echo resp.status, ": ", body, " --- url: ", url
|
||||||
result = newJNull()
|
result = newJNull()
|
||||||
|
|
||||||
updateToken()
|
updateToken()
|
||||||
|
@ -108,7 +108,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
|
||||||
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =
|
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =
|
||||||
fetchImpl result:
|
fetchImpl result:
|
||||||
if not (result.startsWith('{') or result.startsWith('[')):
|
if not (result.startsWith('{') or result.startsWith('[')):
|
||||||
echo resp.status, ": ", result
|
echo resp.status, ": ", result, " --- url: ", url
|
||||||
result.setLen(0)
|
result.setLen(0)
|
||||||
|
|
||||||
updateToken()
|
updateToken()
|
||||||
|
|
Loading…
Reference in a new issue