Skip to content

Commit

Permalink
Remove extensive error logging for spotify connection issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Berehum committed Feb 4, 2025
1 parent 49a1c5c commit 0333df5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions amelie/narrowcasting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def room_spotify_now_playing(request):
params={"market": "from_token"},
headers={"Authorization": "Bearer {}".format(assoc.access_token)}
)
except ConnectionError as e:
except ConnectionError:
log = logging.getLogger("amelie.narrowcasting.views.room_spotify_now_playing")
log.warning(f"ConnectionError while retrieving player info: {e}")
log.warning(f"ConnectionError while retrieving player info")
# Return empty response
return JsonResponse({})

Expand Down Expand Up @@ -169,9 +169,9 @@ def room_spotify_pause(request):
res = requests.put("https://api.spotify.com/v1/me/player/pause",
headers={"Authorization": "Bearer {}".format(assoc.access_token)}
)
except ConnectionError as e:
except ConnectionError:
log = logging.getLogger("amelie.narrowcasting.views.room_spotify_now_playing")
log.warning(f"ConnectionError while pausing Spotify player: {e}")
log.warning(f"ConnectionError while pausing Spotify player")
# Return empty response
return JsonResponse({})

Expand Down Expand Up @@ -214,9 +214,9 @@ def room_spotify_play(request):
res = requests.put("https://api.spotify.com/v1/me/player/play",
headers={"Authorization": "Bearer {}".format(assoc.access_token)}
)
except ConnectionError as e:
except ConnectionError:
log = logging.getLogger("amelie.narrowcasting.views.room_spotify_now_playing")
log.warning(f"ConnectionError while unpausing Spotify player: {e}")
log.warning(f"ConnectionError while unpausing Spotify player")
# Return empty response
return JsonResponse({})

Expand Down

0 comments on commit 0333df5

Please sign in to comment.