Skip to content

Commit

Permalink
fix bug with error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
thaaddeus committed Dec 5, 2024
1 parent aae0a45 commit 6d3be24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tardis_client/data_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async def _reliably_fetch_and_cache_slice(session, endpoint, exchange, from_date

if isinstance(ex, urllib.error.HTTPError):
# do not retry when we've got bad or unauthorized request or enough attempts
if (ex.code == 400 and 'ISO 8601 format' in ex.msg == False) or ex.code == 401:
if (ex.code == 400 and 'ISO 8601 format' not in ex.msg) or ex.code == 401:
raise ex
if ex.code == 429:
too_many_requests = True
Expand Down

0 comments on commit 6d3be24

Please sign in to comment.