mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #108] Authentication failure should not panic, but exit without panic and a proper error message #98
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#98
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 @michaelherger on GitHub (Jan 30, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/108
Currently if authentication fails, librespot would panic
This is ugly, as it's not an unexpected failure, but a very valid and to be expected error state. The panic message leads to many users ignoring the actual message about the authentication failure.
See
github.com/librespot-org/librespot@5f21c25828/core/src/connection/mod.rs (L70)@ComlOnline commented on GitHub (Jan 30, 2018):
This is very related to #52.
The error needs to tell us that auth failed or the user is using a free account.
I'll close that issue.
@sashahilton00 commented on GitHub (Feb 5, 2018):
In light of the recent decision to try and separate librespot into the core library, and a more featureful easy to use daemon, I'm inclined to suggest that we leave this be, as panicking is the correct behaviour if an invalid/free account is used. What we could do is add an extra line to the output at an info level which tells people that either their password is bad, or they're using a free account. I'm not sure there is a way to distinguish between auth failed and free accounts, as typically the user would not see the option to use spotify connect when using a free account.
@ComlOnline commented on GitHub (Feb 5, 2018):
As long as it says it could be either in a clear way, I'm sure they will figure it out. (I hope)
@sashahilton00 commented on GitHub (Feb 10, 2018):
Have added an error message in PR referenced above. Please let me know if you're satisfied that it's informative enough, then will merge, corrections notwithstanding.
@ComlOnline commented on GitHub (Feb 11, 2018):
Sorry I'm MIA, currently on holiday in Canada, Yeah That works great, Through from the sounds of it Paul thinks it may be possible to actually differentiate between auth failed and not premium. Either way good work!