[PR #127] [MERGED] Added Authentication specific exception #263

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

📋 Pull Request Information

Original PR: https://github.com/jwilsson/spotify-web-api-php/pull/127
Author: @doekenorg
Created: 6/5/2018
Status: Merged
Merged: 6/6/2018
Merged by: @jwilsson

Base: masterHead: feature/AuthException


📝 Commits (1)

  • 3d3a9cd Added Authentication specific exception

📊 Changes

3 files changed (+18 additions, -2 deletions)

View changed files

📝 src/Request.php (+9 -1)
src/SpotifyWebAPIAuthException.php (+8 -0)
📝 tests/RequestTest.php (+1 -1)

📄 Description

I would like to be able to catch authentication specific exceptions, so I can automate the refreshing of tokens more easily. I know I have the time when the access token needs to be refreshed, but even then sometimes the token is invalidated earlier, and I get the exception.

Also updated the test so it reflects this change, while making it backwards compatible by extending the original SpotifyWebAPIException.

Please consider a merge. Thanks for the great library!


🔄 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/127 **Author:** [@doekenorg](https://github.com/doekenorg) **Created:** 6/5/2018 **Status:** ✅ Merged **Merged:** 6/6/2018 **Merged by:** [@jwilsson](https://github.com/jwilsson) **Base:** `master` ← **Head:** `feature/AuthException` --- ### 📝 Commits (1) - [`3d3a9cd`](https://github.com/jwilsson/spotify-web-api-php/commit/3d3a9cd1f589af8c3284a7c1db130868665cb7d8) Added Authentication specific exception ### 📊 Changes **3 files changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/Request.php` (+9 -1) ➕ `src/SpotifyWebAPIAuthException.php` (+8 -0) 📝 `tests/RequestTest.php` (+1 -1) </details> ### 📄 Description I would like to be able to catch authentication specific exceptions, so I can automate the refreshing of tokens more easily. I know I have the time when the access token needs to be refreshed, but even then sometimes the token is invalidated earlier, and I get the exception. Also updated the test so it reflects this change, while making it backwards compatible by extending the original `SpotifyWebAPIException`. Please consider a merge. Thanks for the great library! --- <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:51 +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#263
No description provided.