mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-26 23:45:49 +03:00
[GH-ISSUE #155] Access to "reason" in SpotifyWebAPIException when working with player #98
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#98
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 @mengidd on GitHub (May 30, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/155
When working with the player and Spotify returns an error, a reason string is included in the response. It would be super handy to get access to this reason string through the SpotifyWebAPIException exception, with for instance
$e->getReason(). This would make it much easier to deal with the different errors.The reason string is available in the response body with the key
reasonon player errors.If this is something you might consider I don't mind submitting a PR for it.
@jwilsson commented on GitHub (May 31, 2019):
Cool, I didn't know about that property!
A PR adding a
getReasonmethod would be highly appreciated!