Skip to content

Commit efece88

Browse files
committed
Update error message for HTTP 429.
1 parent bc73044 commit efece88

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ try {
9999
} catch ( ListenNotes\PodcastApi\Exception\NotFoundException $objException ) {
100100
print("Endpoint not exist or the podcast / episode not exist!");
101101
} catch ( ListenNotes\PodcastApi\Exception\RateLimitException $objException ) {
102-
print("You have reached your quota limit!");
102+
print("You have reached your quota limit or rate limit!");
103103
} catch ( ListenNotes\PodcastApi\Exception\ListenApiException $objException ) {
104104
print("Something wrong on Listen Notes servers");
105105
} catch ( Exception $e ) {
@@ -121,7 +121,7 @@ the sort of error that occurred.
121121
| AuthenticationException | wrong api key or your account is suspended |
122122
| APIConnectionException | fail to connect to API servers |
123123
| InvalidRequestException | something wrong on your end (client side errors), e.g., missing required parameters |
124-
| RateLimitException | you are using FREE plan and you exceed the quota limit |
124+
| RateLimitException | for FREE plan, exceeding the quota limit; or for all plans, sending too many requests too fast and exceeding the rate limit |
125125
| NotFoundException | endpoint not exist, or podcast / episode not exist |
126126
| ListenApiException | something wrong on our end (unexpected server errors) |
127127

examples/sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
} catch ( ListenNotes\PodcastApi\Exception\NotFoundException $objException ) {
2929
print("Endpoint not exist or the podcast / episode not exist!");
3030
} catch ( ListenNotes\PodcastApi\Exception\RateLimitException $objException ) {
31-
print("You have reached your quota limit!");
31+
print("You have reached your quota limit or rate limit!");
3232
} catch ( ListenNotes\PodcastApi\Exception\ListenApiException $objException ) {
3333
print("Something wrong on Listen Notes servers");
3434
} catch ( Exception $e ) {

listennotes/Exception/RateLimitException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
class RateLimitException extends ListenApiException
66
{
77
const STATUS = 429;
8-
// Too many requests made to the API too quickly
8+
// For FREE plan, exceeding the quota limit;
9+
// or for all plans, sending too many requests too fast and
10+
// exceeding the rate limit - https://www.listennotes.com/api/faq/#faq17
911
}

listennotes/Http/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected function _processStatusCode()
205205
break;
206206

207207
case 429:
208-
throw new Exception\RateLimitException( 'You use FREE plan and you exceed the quota limit.' );
208+
throw new Exception\RateLimitException( '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' );
209209
break;
210210

211211
default:

0 commit comments

Comments
 (0)