mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-26 23:45:49 +03:00
[PR #60] [CLOSED] Add parameter to prevent Request throwing exceptions #238
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jwilsson/spotify-web-api-php/pull/60
Author: @outspaced
Created: 12/9/2016
Status: ❌ Closed
Base:
master← Head:master📝 Commits (5)
8ba73ffAdded parameter to disable exceptions6778ff0Added aa sort-of unit test80ee205Default exceptions to true to stay consistente2c8390Removed rogue spacee85523bUnit test for SpotifyWebAPI::setThrowExceptions📊 Changes
4 files changed (+45 additions, -1 deletions)
View changed files
📝
src/Request.php(+14 -1)📝
src/SpotifyWebAPI.php(+13 -0)📝
tests/RequestTest.php(+10 -0)📝
tests/SpotifyWebAPITest.php(+8 -0)📄 Description
in the current implementation, a "rate limit exceeded" response results in Request throwing an exception. This means that SpotifyWebAPI::$lastResponse does not get set, so there is no way to access the Retry-After header.
Simply not throwing the exception means that the response gets returned, and the caller can check the status and decide if this should be an exception or not.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.