[GH-ISSUE #7] Getting bad request #6

Closed
opened 2026-02-27 20:22:34 +03:00 by kerem · 3 comments
Owner

Originally created by @kbrah on GitHub (May 18, 2018).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/7

I recently started getting bad request from all the requests. I can reproduce it with the example in the README with brand new client id and secret.
This is the response I get:

response: Response { url: "https://api.spotify.com/v1/me/player/recently-played?limit=10&", status: BadRequest, headers: {"Content-Type": "text/html; charset=UTF-8", "Referrer-Policy": "no-referrer", "Content-Length": "1555", "Date": "Fri, 18 May 2018 21:49:43 GMT"} }
content: "<!DOCTYPE html>\n<html lang=en>\n  <meta charset=utf-8>\n  <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">\n  <title>Error 400 (Bad Request)!!1</title>\n  <style>\n    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n  </style>\n  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n  <p><b>400.</b> <ins>That’s an error.</ins>\n  <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>\n"
Err(Error(Msg("convert result failed, content \"\""), State { next_error: Some(Error("EOF while parsing a value", line: 1, column: 0)), backtrace: None })
Originally created by @kbrah on GitHub (May 18, 2018). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/7 I recently started getting bad request from all the requests. I can reproduce it with the example in the README with brand new client id and secret. This is the response I get: ``` response: Response { url: "https://api.spotify.com/v1/me/player/recently-played?limit=10&", status: BadRequest, headers: {"Content-Type": "text/html; charset=UTF-8", "Referrer-Policy": "no-referrer", "Content-Length": "1555", "Date": "Fri, 18 May 2018 21:49:43 GMT"} } content: "<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">\n <title>Error 400 (Bad Request)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n </style>\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n <p><b>400.</b> <ins>That’s an error.</ins>\n <p>Your client has issued a malformed or illegal request. <ins>That’s all we know.</ins>\n" Err(Error(Msg("convert result failed, content \"\""), State { next_error: Some(Error("EOF while parsing a value", line: 1, column: 0)), backtrace: None }) ```
kerem closed this issue 2026-02-27 20:22:34 +03:00
Author
Owner

@DomWilliams0 commented on GitHub (May 18, 2018):

This was fixed in c4b8167, but hasn't yet been updated on crates.io.

@samrayleung could you please bump the version and update it please? 🤓

<!-- gh-comment-id:390343789 --> @DomWilliams0 commented on GitHub (May 18, 2018): This was fixed in c4b8167, but hasn't yet been updated on crates.io. @samrayleung could you please bump the version and update it please? 🤓
Author
Owner

@ramsayleung commented on GitHub (May 19, 2018):

I have bumped rspotify to 0.2.1, everything should work fine now. For more information, you could check https://crates.io/crates/rspotify

<!-- gh-comment-id:390379638 --> @ramsayleung commented on GitHub (May 19, 2018): I have bumped `rspotify` to 0.2.1, everything should work fine now. For more information, you could check https://crates.io/crates/rspotify
Author
Owner

@kbrah commented on GitHub (May 19, 2018):

that solved it!

<!-- gh-comment-id:390398178 --> @kbrah commented on GitHub (May 19, 2018): that solved it!
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#6
No description provided.