[PR #91] [MERGED] Handle regular and player error objects #237

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

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/91
Author: @sputnick1124
Created: 4/23/2020
Status: Merged
Merged: 5/4/2020
Merged by: @ramsayleung

Base: masterHead: error-reporting


📝 Commits (3)

  • b7b7c6f Handle regular and player error objects
  • edd61e1 Improve error reporting for blocking API
  • 02ab558 Make clippy happy

📊 Changes

3 files changed (+70 additions, -13 deletions)

View changed files

📝 src/blocking/client.rs (+34 -6)
📝 src/client.rs (+36 -6)
📝 src/oauth2.rs (+0 -1)

📄 Description

Addresses #63.

There is a message given alongside most API errors, but it has been
thrown away until now. This commit presents the full JSON object to the
end consumer of the error (see error object, player error object)

The From<&Response> impl was removed and replaced with a non-trait from_response method so that the async Response::json method could be called.


🔄 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/91 **Author:** [@sputnick1124](https://github.com/sputnick1124) **Created:** 4/23/2020 **Status:** ✅ Merged **Merged:** 5/4/2020 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `error-reporting` --- ### 📝 Commits (3) - [`b7b7c6f`](https://github.com/ramsayleung/rspotify/commit/b7b7c6f8b959724699eaf656a2b22de881e2e818) Handle regular and player error objects - [`edd61e1`](https://github.com/ramsayleung/rspotify/commit/edd61e123393d0d5ecf86cdb3db875dd48382fa6) Improve error reporting for blocking API - [`02ab558`](https://github.com/ramsayleung/rspotify/commit/02ab558e09f456c826de80734992029aa8225ce6) Make clippy happy ### 📊 Changes **3 files changed** (+70 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/blocking/client.rs` (+34 -6) 📝 `src/client.rs` (+36 -6) 📝 `src/oauth2.rs` (+0 -1) </details> ### 📄 Description Addresses #63. There is a message given alongside most API errors, but it has been thrown away until now. This commit presents the full JSON object to the end consumer of the error (see [error object](https://developer.spotify.com/documentation/web-api/reference/object-model/#error-object), [player error object](https://developer.spotify.com/documentation/web-api/reference/object-model/#player-error-object)) The `From<&Response>` impl was removed and replaced with a non-trait `from_response` method so that the async `Response::json` method could be called. --- <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:54 +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#237
No description provided.