[PR #156] [MERGED] Added method getReason() to SpotifyWebAPIException #268

Closed
opened 2026-02-27 19:26:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jwilsson/spotify-web-api-php/pull/156
Author: @mengidd
Created: 5/31/2019
Status: Merged
Merged: 6/19/2019
Merged by: @jwilsson

Base: masterHead: master


📝 Commits (1)

  • dc05bef Added method getReason() to SpotifyWebAPIException that returns the reason string returned by the player api if a request fails

📊 Changes

3 files changed (+43 additions, -1 deletions)

View changed files

📝 src/Request.php (+7 -1)
📝 src/SpotifyWebAPIException.php (+27 -0)
📝 tests/SpotifyWebAPITest.php (+9 -0)

📄 Description

When working with the Player API it's really handy to have the error reason string available.

I've not written much tests in my life, and I'm honestly not sure if this will do. If you want anything changed, just let me know and I will try to have it fixed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jwilsson/spotify-web-api-php/pull/156 **Author:** [@mengidd](https://github.com/mengidd) **Created:** 5/31/2019 **Status:** ✅ Merged **Merged:** 6/19/2019 **Merged by:** [@jwilsson](https://github.com/jwilsson) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`dc05bef`](https://github.com/jwilsson/spotify-web-api-php/commit/dc05bef6d1f49e017e94b35976d0887785a4dcb4) Added method getReason() to SpotifyWebAPIException that returns the reason string returned by the player api if a request fails ### 📊 Changes **3 files changed** (+43 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Request.php` (+7 -1) 📝 `src/SpotifyWebAPIException.php` (+27 -0) 📝 `tests/SpotifyWebAPITest.php` (+9 -0) </details> ### 📄 Description When working with the Player API it's really handy to have the [error reason string](https://developer.spotify.com/documentation/web-api/reference/object-model/#player-error-reasons) available. I've not written much tests in my life, and I'm honestly not sure if this will do. If you want anything changed, just let me know and I will try to have it fixed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 19:26:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#268
No description provided.