Skip to content

Commit ebe2760

Browse files
committed
Catch auth error
1 parent 9025b58 commit ebe2760

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

elmax/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async def connect(self):
6868
# The API doesn't respond with 401 but there will be no JSON
6969
except json.decoder.JSONDecodeError:
7070
self.authorized = False
71-
_LOGGER.error("Credentials are not valid")
71+
raise exceptions.ElmaxConnectionError("Credentials are not valid")
7272

7373
async def disconnect(self):
7474
"""Terminate the connection to the API."""

0 commit comments

Comments
 (0)