mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Add 5xx error panic
This commit is contained in:
parent
8995f7609f
commit
96124c5e18
2 changed files with 10 additions and 8 deletions
|
@ -189,7 +189,9 @@ impl MercuryManager {
|
|||
payload: pending.parts,
|
||||
};
|
||||
|
||||
if response.status_code >= 400 {
|
||||
if response.status_code >= 500 {
|
||||
panic!("Spotify servers returned an error. Restart librespot.");
|
||||
} else if response.status_code >= 400 {
|
||||
warn!("error {} for uri {}", response.status_code, &response.uri);
|
||||
if let Some(cb) = pending.callback {
|
||||
let _ = cb.send(Err(MercuryError));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue