Raise HomeAssistant error on failed Spotify service calls (#91299)

pull/91321/head
Franck Nijhof 2023-04-13 02:42:33 +02:00 committed by GitHub
parent 99afab723b
commit 355404a959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -95,6 +95,7 @@ def spotify_exception_handler(func):
self._attr_available = False
if exc.reason == "NO_ACTIVE_DEVICE":
raise HomeAssistantError("No active playback device found") from None
raise HomeAssistantError(f"Spotify error: {exc.reason}") from exc
return wrapper