mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1167] Expose AuthenticationError enum #540
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#540
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 @beaverking1212 on GitHub (May 17, 2023).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1167
Is your feature request related to a problem? Please describe.
There is a problem. When calling
Session::connect()it is hard to determine whether login has failed or another error occurred.Describe the solution you'd like
I want to be able to check whether
Session::connect()returned error due to failed login.Describe alternatives you've considered
Alternative is converting error to text, it works, but looks fragile.
gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-@ea26d0d6d5/audio/spotify/src/common.rs (L170)Additional context
Problem was noticed in: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1195
@beaverking1212 commented on GitHub (May 17, 2023):
@gdesmott
@kingosticks commented on GitHub (Oct 7, 2024):
FYI this is fixed in dev branch
@4310V343k commented on GitHub (Sep 21, 2025):
Can you link the commit? I don't think
librespot::core::connection::AuthenticationErroris exported anywhere@kingosticks commented on GitHub (Sep 21, 2025):
https://docs.rs/librespot-core/0.7.1/librespot_core/authentication/enum.AuthenticationError.html
@4310V343k commented on GitHub (Sep 21, 2025):
The
AuthenticationErrorenum mentioned is located inlibrespot::core::connection::AuthenticationError, notlibrespot::core::authentication::AuthenticationError@kingosticks commented on GitHub (Oct 3, 2025):
Yep, sorry, you are right. I didn't look hard enough at what you were asking and then lost this one.
I don't think there is a real reason we don't expose it other than it lives in a module we don't generally expose. I think agree it's useful and worth improving. What's the easiest way to expose just that? Can you submit a PR?
@4310V343k commented on GitHub (Oct 3, 2025):
Similar to this, perhaps?
github.com/librespot-org/librespot@a407beaa45/core/src/lib.rs (L41-L46)@kingosticks commented on GitHub (Oct 3, 2025):
Feel free to submit an appropriate PR. Please include a changelog entry.