Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Set Playlist Image With Autoretry #182

Closed
Wakeful-Cloud opened this issue Jan 6, 2022 · 0 comments · Fixed by #213
Closed

Cannot Set Playlist Image With Autoretry #182

Wakeful-Cloud opened this issue Jan 6, 2022 · 0 comments · Fixed by #213
Assignees

Comments

@Wakeful-Cloud
Copy link

Wakeful-Cloud commented Jan 6, 2022

Version

  • Go: go version go1.17.5 windows/amd64
  • github.com/zmb3/spotify/v2: v2.0.1

Issue

When I invoke client.SetPlaylistImage without client.WithRetry, everything works and the playlist image updates. When I invoke client.SetPlaylistImage with client.WithRetry, the playlist image is updated but client.SetPlaylistImage returns "io: read/write on closed pipe".

Expected Behavior

client.SetPlaylistImage should work the same with or without autoretry

Possible Cause

The API endpoint (PUT /playlists/{playlist_id}/images) returns 202 Accepted (Regardless if autoretry is enabled or not) which is then retried because of shouldRetry. The reason that it works without autoretry is this if statement. I'm not entirely sure if the problem is Spotify returning an unexpected response (Please note that this library seems to anticipate the 202 response here) or the condition in shouldRetry.

It seems this may have been discussed in #100 (Specifically this comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants