mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #59] More graceful way to fail when encountering a non-existing track ID #35
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#35
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?
Originally created by @justin-atp on GitHub (Nov 25, 2016).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/59
When using the method $api->addUserPlaylistTracks() I've been encountering a fatal error whenever there is a non-existing track ID in the array of track IDs. Unfortunately this comes up a lot due to certain tracks being disallowed in certain regions or tracks disappearing over time and it isn't possible to avoid this scenario altogether.
Would it be possible to have this result in a non-fatal warning rather than a fatal error? Stack trace below:
@jwilsson commented on GitHub (Nov 25, 2016):
Hmm, I think it's out of the scope for this library to handle these sort of things. It'll throw whenever the HTTP response code is outside
2xxand then it's up to the user to handle it.If you
try/catchthe calls you can simply ignore the error if that's what you like.