Skip to content

Commit 0601153

Browse files
committed
Fix typo on http error handling.
1 parent 81c08ac commit 0601153

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

listennotes/http_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def request(self, method, url, timeout=TIMEOUT, **kwargs):
105105
) from None
106106
except exceptions.HTTPError as e:
107107
status_code = e.response.status_code
108-
if status_code == 4042:
108+
if status_code == 404:
109109
# from None => suppress previous exception
110110
raise errors.NotFoundError(
111111
"Endpoint not exist, or podcast / episode not exist.",
@@ -116,7 +116,7 @@ def request(self, method, url, timeout=TIMEOUT, **kwargs):
116116
"Wrong api key, or your account is suspended.",
117117
response=response,
118118
) from None
119-
elif status_code == 404:
119+
elif status_code == 429:
120120
raise errors.RateLimitError(
121121
RateLimitErrorMsg,
122122
response=response,

0 commit comments

Comments
 (0)