Skip to content

Commit

Permalink
Add URL to request errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Jan 23, 2022
1 parent c355bed commit f58824c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apiutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
if body.startsWith('{') or body.startsWith('['):
result = parseJson(body)
else:
echo resp.status, ": ", body
echo resp.status, ": ", body, " --- url: ", url
result = newJNull()

updateToken()
Expand All @@ -108,7 +108,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =
fetchImpl result:
if not (result.startsWith('{') or result.startsWith('[')):
echo resp.status, ": ", result
echo resp.status, ": ", result, " --- url: ", url
result.setLen(0)

updateToken()
Expand Down

0 comments on commit f58824c

Please sign in to comment.