Skip to content

Commit

Permalink
Allocate to TadoException
Browse files Browse the repository at this point in the history
  • Loading branch information
erwindouna committed Dec 26, 2024
1 parent 25d67c3 commit 07e7c37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PyTado/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def request(self, request: TadoRequest) -> dict[str, Any]:
_DEFAULT_RETRIES,
e,
)
raise e
raise TadoException(e)

if response.text is None or response.text == "":
return {}
Expand Down Expand Up @@ -287,7 +287,7 @@ def _refresh_token(self) -> None:
)
except requests.exceptions.ConnectionError as e:
_LOGGER.error("Connection error: %s", e)
raise e
raise TadoException(e)

if response.status_code != 200:
raise TadoWrongCredentialsException(
Expand Down Expand Up @@ -324,7 +324,7 @@ def _login(self) -> tuple[int, str]:
)
except requests.exceptions.ConnectionError as e:
_LOGGER.error("Connection error: %s", e)
raise e
raise TadoException(e)

if response.status_code == 400:
raise TadoWrongCredentialsException("Your username or password is invalid")
Expand Down

0 comments on commit 07e7c37

Please sign in to comment.