[PR #449] [MERGED] Return new error InvalidToken if user is not yet authenticated #461

Closed
opened 2026-02-27 20:24:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/449
Author: @har0ke
Created: 12/18/2023
Status: Merged
Merged: 12/19/2023
Merged by: @ramsayleung

Base: masterHead: no-panicking-when-not-authenticated


📝 Commits (2)

  • d28adff Return new error InvalidToken if user is not yet authenticated
  • 7767902 Change formatting to make CI happy

📊 Changes

2 files changed (+15 additions, -13 deletions)

View changed files

📝 src/clients/base.rs (+12 -13)
📝 src/lib.rs (+3 -0)

📄 Description

Description

Return new error InvalidToken if user is not yet authenticated. The library should never panic when the user forgets to authenticate, but return a valid error to the user.

Motivation and Context

Resolves https://github.com/ramsayleung/rspotify/issues/333

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

🔄 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/ramsayleung/rspotify/pull/449 **Author:** [@har0ke](https://github.com/har0ke) **Created:** 12/18/2023 **Status:** ✅ Merged **Merged:** 12/19/2023 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `no-panicking-when-not-authenticated` --- ### 📝 Commits (2) - [`d28adff`](https://github.com/ramsayleung/rspotify/commit/d28adff829653fdc4a367dfee3aeec35c5d07176) Return new error InvalidToken if user is not yet authenticated - [`7767902`](https://github.com/ramsayleung/rspotify/commit/776790247f25c090ad3d3b8b24f96c37e8f15867) Change formatting to make CI happy ### 📊 Changes **2 files changed** (+15 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/clients/base.rs` (+12 -13) 📝 `src/lib.rs` (+3 -0) </details> ### 📄 Description ## Description Return new error `InvalidToken` if user is not yet authenticated. The library should never panic when the user forgets to authenticate, but return a valid error to the user. ## Motivation and Context Resolves https://github.com/ramsayleung/rspotify/issues/333 ## Type of change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:49 +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/rspotify#461
No description provided.