[PR #36] [MERGED] Allow applications to perform error handling #196

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/36
Author: @hrkfdn
Created: 3/20/2019
Status: Merged
Merged: 3/21/2019
Merged by: @ramsayleung

Base: masterHead: master


📝 Commits (3)

  • 5f4a52c provide error information to the application
  • e59cd98 do not print on std streams, this will garble ncurses applications
  • 6029b8f make sure api errors don't get swallowed by convert_result

📊 Changes

1 file changed (+116 additions, -90 deletions)

View changed files

📝 src/spotify/client.rs (+116 -90)

📄 Description

Currently, applications using rspotify can not easily determine why an API request has failed. However, this may be necessary to handle certain errors such as rate limits imposed by Spotify or expired authentication tokens.

This patch gives applications the opportunity to handle these situations. For instance, if a rate limit error occurs, the application can wait for the specified delay and retry the request.

Closes #35


🔄 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/36 **Author:** [@hrkfdn](https://github.com/hrkfdn) **Created:** 3/20/2019 **Status:** ✅ Merged **Merged:** 3/21/2019 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`5f4a52c`](https://github.com/ramsayleung/rspotify/commit/5f4a52c8e41df523ebabfb1479b454729017c3a3) provide error information to the application - [`e59cd98`](https://github.com/ramsayleung/rspotify/commit/e59cd9824bcbc49793feda4d4c14f29baca0b648) do not print on std streams, this will garble ncurses applications - [`6029b8f`](https://github.com/ramsayleung/rspotify/commit/6029b8f50f4e5fade2ded3e3fdfe5ab8e3908450) make sure api errors don't get swallowed by convert_result ### 📊 Changes **1 file changed** (+116 additions, -90 deletions) <details> <summary>View changed files</summary> 📝 `src/spotify/client.rs` (+116 -90) </details> ### 📄 Description Currently, applications using rspotify can not easily determine why an API request has failed. However, this may be necessary to handle certain errors such as [rate limits](https://developer.spotify.com/documentation/web-api/#rate-limiting) imposed by Spotify or expired authentication tokens. This patch gives applications the opportunity to handle these situations. For instance, if a rate limit error occurs, the application can wait for the specified delay and retry the request. Closes #35 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:23:44 +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#196
No description provided.