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

[Bug] API returns 403 with error "index out of bound" when calling a playlist with 0 videos #4679

Open
WalsGit opened this issue May 3, 2024 · 0 comments · May be fixed by #4696
Open

[Bug] API returns 403 with error "index out of bound" when calling a playlist with 0 videos #4679

WalsGit opened this issue May 3, 2024 · 0 comments · May be fixed by #4696
Labels

Comments

@WalsGit
Copy link

WalsGit commented May 3, 2024

Describe the bug
When I make a api call to an existing playlist https://myinstance.tld/api/v1/auth/playlists/{playlist id} that has no videos in it return a 403 error with { "error": "Index out of bounds" }

Steps to Reproduce
I'm using the api call in a function for my userscript, but I tried it directly in the address bar of my browser and had the same result:

  1. logged in to my instance
  2. removed all videos from an existing playlist
  3. made the api call in the browser using the playlist id
  4. got the json with error mentioned.
  5. added a video to the playlist
  6. remade the api call
  7. got the proper callback (all ok)
  8. created a new playlist without adding a video to it
  9. made a new api call with the new playlist's id
  10. got the error
  11. added a video to the new playlist
  12. remade the api call
  13. and all is good again.

Additional context
As I said, it seems to be happening to only empty playlists. As I said I'm using this api call to check if a playlist exists or not (it doesn't matter if it has no videos) and I think this error shouldn't be there for an existing playlist and I should be getting the playlist's object with the videoCount set to 0.

@WalsGit WalsGit added the bug Something isn't working label May 3, 2024
@Fijxu Fijxu linked a pull request May 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants