mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #349] bad request when trying to create playlist #107
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#107
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fprasx on GitHub (Jul 25, 2022).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/349
Describe the bug
Whenever I try to use
user_playlist_createI getError: http error: status code 400 Bad Request. Other API calls work fine.To Reproduce
Here is a minimum working example:
This panics with the error "Error: http error: status code 400 Bad Request". The API call
spotify.me()works fine.Expected behavior
I expected the playlist to be created (or have some other error like a network error).
Log/Output data
Running with
RUST_LOG=trace cargo runproduces the following:Additional context
N/A
@ramsayleung commented on GitHub (Jul 27, 2022):
Oooh, thanks for your report, I can reproduce this problem, I will dig deep to figure out what's wrong.
PS:
It turns out that there is nothing to do with
RSpotify, you can't setpublictotrueandcollaborativetotrueat the same time. According to the Spotify API documentation:@marioortizmanero commented on GitHub (Jul 27, 2022):
That sounds like a good opportunity to add a
debug_assertand improve our errors! #352 should fix it.@fprasx commented on GitHub (Jul 28, 2022):
I saw the fix, thank you! When will the corrected functionality be available to users? I noticed the code is stil the same on docs.rs.
@ramsayleung commented on GitHub (Jul 29, 2022):
What does correct functionality mean? Do you mean the
debug_assertstatement? The docs.rs will change after we release a new version, so it needs to wait for a while util a new release.@marioortizmanero commented on GitHub (Jul 29, 2022):
Yup, the next release is blocked by #329. Not sure if we should wait for @SabrinaJewson for that, or if we should fix it ourselves. Once @ramsayleung takes a look at #327 and #337, we can also merge them. #336 would be nice to merge as well, but has less priority and we can leave it for a future version if necessary. Oh, and I might implement #350 if it's simple enough.
@marioortizmanero commented on GitHub (Jul 29, 2022):
Though I wouldn't really call #352 a 'fix'. You should be able to use the current version just fine. The new one will just stop the execution in debug mode if the invariant you were breaking isn't met, but only for usability reasons.
@fprasx commented on GitHub (Aug 1, 2022):
Ahh, my mistake with the language. Thank you for the help!