diff --git a/src/apiutils.nim b/src/apiutils.nim index e45954c..4f35f8d 100644 --- a/src/apiutils.nim +++ b/src/apiutils.nim @@ -76,6 +76,9 @@ template fetchImpl(result, additional_headers, fetchBody) {.dirty.} = if resp.status == "401 Unauthorized" and result.len == 0: getContent() + if resp.status == $Http429: + raise rateLimitError() + if resp.status == $Http503: badClient = true raise newException(InternalError, result)