Skip to content

Commit b1943f8

Browse files
committed
Update error message for HTTP 429.
1 parent 6fafa18 commit b1943f8

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
podcast_api (1.1.0)
4+
podcast_api (1.1.1)
55
httparty
66

77
GEM
@@ -10,9 +10,9 @@ GEM
1010
httparty (0.20.0)
1111
mime-types (~> 3.0)
1212
multi_xml (>= 0.5.2)
13-
mime-types (3.3.1)
13+
mime-types (3.4.1)
1414
mime-types-data (~> 3.2015)
15-
mime-types-data (3.2021.0901)
15+
mime-types-data (3.2022.0105)
1616
mocha (1.12.0)
1717
multi_xml (0.6.0)
1818
power_assert (2.0.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ rescue PodcastApi::InvalidRequestError
8080
rescue PodcastApi::NotFoundError
8181
puts 'Not found'
8282
rescue PodcastApi::RateLimitError
83-
puts 'Reached quota limit'
83+
puts 'Reached quota limit or rate limit'
8484
rescue PodcastApi::APIConnectionError
8585
puts 'Failed to connect to Listen API servers'
8686
rescue PodcastApi::PodcastApiError
@@ -105,7 +105,7 @@ the sort of error that occurred.
105105
| AuthenticationError | wrong api key or your account is suspended |
106106
| APIConnectionError | fail to connect to API servers |
107107
| InvalidRequestError | something wrong on your end (client side errors), e.g., missing required parameters |
108-
| RateLimitError | you are using FREE plan and you exceed the quota limit |
108+
| RateLimitError | for FREE plan, exceeding the quota limit; or for all plans, sending too many requests too fast and exceeding the rate limit |
109109
| NotFoundError | endpoint not exist, or podcast / episode not exist |
110110
| PodcastApiError | something wrong on our end (unexpected server errors) |
111111

examples/Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
podcast_api (1.1.0)
4+
podcast_api (1.1.1)
55
httparty
66

77
GEM
@@ -10,9 +10,9 @@ GEM
1010
httparty (0.20.0)
1111
mime-types (~> 3.0)
1212
multi_xml (>= 0.5.2)
13-
mime-types (3.3.1)
13+
mime-types (3.4.1)
1414
mime-types-data (~> 3.2015)
15-
mime-types-data (3.2021.0901)
15+
mime-types-data (3.2022.0105)
1616
multi_xml (0.6.0)
1717

1818
PLATFORMS

examples/sample.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
rescue PodcastApi::NotFoundError
1414
puts 'Not found'
1515
rescue PodcastApi::RateLimitError
16-
puts 'Reached quota limit'
16+
puts 'Reached quota limit or rate limit'
1717
rescue PodcastApi::APIConnectionError
1818
puts 'Failed to connect to Listen API servers'
1919
rescue PodcastApi::PodcastApiError

lib/podcast_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_response(response:)
3636
elsif response.code == 404
3737
raise NotFoundError.new 'endpoint not exist, or podcast / episode not exist'
3838
elsif response.code == 429
39-
raise RateLimitError.new 'you are using FREE plan and you exceed the quota limit'
39+
raise RateLimitError.new 'for FREE plan, exceeding the quota limit; or for all plans, sending too many requests too fast and exceeding the rate limit - https://www.listennotes.com/api/faq/#faq17'
4040
else
4141
raise PodcastApiError.new 'something wrong on our end (unexpected server errors)'
4242
end

lib/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PodcastApi
4-
VERSION = "1.1.0"
4+
VERSION = "1.1.1"
55
end

0 commit comments

Comments
 (0)