Skip to content

Commit

Permalink
🐛 fix except wrong target
Browse files Browse the repository at this point in the history
  • Loading branch information
Mai-icy committed Sep 19, 2024
1 parent 1b7497f commit b675f01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SpotifyLyricWindow/common/api/user_api/user_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from collections import namedtuple

import requests
import json

from common.api.exceptions import *
from common.api.user_api.user_auth import SpotifyUserAuth
Expand Down Expand Up @@ -105,7 +106,7 @@ def _player_http(self, method, url_suffix, **kwargs):
res_json = res.json()
if res_json.get("error") and res_json.get("error").get('reason') == 'PREMIUM_REQUIRED':
raise NoPermission("Premium required!")
except requests.JSONDecodeError:
except json.JSONDecodeError:
pass
return res

Expand Down

0 comments on commit b675f01

Please sign in to comment.